usb gadget: g_ether spinlock recursion fix
authorDavid Brownell <david-b@pacbell.net>
Mon, 21 Aug 2006 22:26:38 +0000 (15:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Sep 2006 01:04:30 +0000 (18:04 -0700)
commit789851cf0005b946557340c9bbfc7728906cdbfc
treef10696d1397dead43f70509432266f7afef9aeb9
parentea186651d5a7b822c855de5de505c5c19812bf0b
usb gadget: g_ether spinlock recursion fix

The new spinlock debug code turned up a spinlock recursion bug in the
Ethernet gadget driver on a disconnect path; it would show up with any
UDC driver where the cancellation of active requests was synchronous,
rather than e.g. delayed until a controller's completion IRQ.

That recursion is fixed here by creating and using a new spinlock to
protect the relevant lists.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/ether.c