summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-12-11 22:02:23 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 19:47:15 +0100
commitd48bd977e0dd8c17081d12242bfc09d743ea0d26 (patch)
treef55e55a14cc938a3cd62026181a06c7c398f80ee /drivers/usb
parentusb.h: fix kernel-doc warning (diff)
downloadlinux-d48bd977e0dd8c17081d12242bfc09d743ea0d26.tar.xz
linux-d48bd977e0dd8c17081d12242bfc09d743ea0d26.zip
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 <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 13b326a13377..b04d232d4c65 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -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)