From: Alan Stern Date: Tue, 24 Jun 2008 18:47:19 +0000 (-0400) Subject: usbfs: fix race between open and unregister X-Git-Tag: v2.6.27-rc1~946^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d64aac36394b3c26db53538bfedd8444a3a2206e;p=pandora-kernel.git usbfs: fix race between open and unregister This patch (as1106) fixes a race between opening and unregistering device files in usbfs. The current code drops its reference to the device and then reacquires it, ignoring the possibility that the device structure might have been removed in the meantime. It also doesn't check whether the device is already in the NOTATTACHED state when the file is opened. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed