Skip to content
Snippets Groups Projects
Commit 424d66ce authored by Stefan Richter's avatar Stefan Richter
Browse files

firewire: nosy: fix device shutdown with active client


Fix race between nosy_open() and remove_card() by replacing the
unprotected array of card pointers by a mutex-protected list of cards.

Make card instances reference-counted and let each client hold a
reference.

Notify clients about card removal via POLLHUP in poll()'s events
bitmap; also let read() fail with errno=ENODEV if the card was removed
and everything in the buffer was read.

Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent b6d9c125
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment