mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
USB: fix locking loop by avoiding flush_scheduled_work
This patch (as1027) replaces a call to flush_scheduled_work() -- a dangerous routine to invoke, especially while holding any sort of lock -- with calls to cancel_work_sync() and cancel_delayed_work_sync(). This fixes Bugzilla #9532. Signed-off-by: Alan Stern <[email protected]> CC: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
f88ed90d86
commit
d48bd977e0
1 changed files with 3 additions and 3 deletions
|
|
@ -522,9 +522,9 @@ static void hub_quiesce(struct usb_hub *hub)
|
|||
/* (blocking) stop khubd and related activity */
|
||||
usb_kill_urb(hub->urb);
|
||||
if (hub->has_indicators)
|
||||
cancel_delayed_work(&hub->leds);
|
||||
if (hub->has_indicators || hub->tt.hub)
|
||||
flush_scheduled_work();
|
||||
cancel_delayed_work_sync(&hub->leds);
|
||||
if (hub->tt.hub)
|
||||
cancel_work_sync(&hub->tt.kevent);
|
||||
}
|
||||
|
||||
static void hub_activate(struct usb_hub *hub)
|
||||
|
|
|
|||
Loading…
Reference in a new issue