From: Stefan Richter Date: Thu, 22 Jul 2010 09:56:38 +0000 (+0200) Subject: firewire: nosy: fix device shutdown with active client X-Git-Tag: v2.6.36-rc1~490^2^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=424d66cedae8bebb00fdb917fc8430f7b8a655cf;p=pandora-kernel.git 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: Stefan Richter --- Reading git-diff-tree failed