USB: fix autosuspend race in skeleton driver
authorOliver Neukum <oneukum@suse.de>
Thu, 8 Feb 2007 14:42:53 +0000 (15:42 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Feb 2007 23:32:19 +0000 (15:32 -0800)
as the skeleton driver was made ready for autosuspend a race condition
was introduced. The reference to get device must be gotten before the
autosuspend counter is upped, as this operation may sleep, dropping BKL.
Dropping BKL means that the pointer to the device may become invalid.
Here's the fix.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

No differences found