Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d48bd977e0dd8c17081d12242bfc09d743ea0d26 Commit: d48bd977e0dd8c17081d12242bfc09d743ea0d26 Parent: f88ed90d8627d0d3d93b330d6d2012c2934fb54e Author: Alan Stern <[EMAIL PROTECTED]> AuthorDate: Tue Dec 11 16:02:23 2007 -0500 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Mon Dec 17 10:47:15 2007 -0800
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]> --- drivers/usb/core/hub.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 13b326a..b04d232 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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html