patch usb-fix-locking-loop-by-avoiding-flush_scheduled_work.patch added to gregkh-2.6 tree

<[email protected]>
Newsgroups gmane.linux.usb.general,gmane.linux.usb.devel
Message-ID <[email protected]>
This is a note to let you know that I've just added the patch titled

     Subject: USB: fix locking loop by avoiding flush_scheduled_work

to my gregkh-2.6 tree.  Its filename is

     usb-fix-locking-loop-by-avoiding-flush_scheduled_work.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


From [email protected] Tue Dec 11 13:02:30 2007
From: Alan Stern <stern-nwvwT67g6+6dFdvTe/[email protected]>
Date: Tue, 11 Dec 2007 16:02:23 -0500 (EST)
Subject: USB: fix locking loop by avoiding flush_scheduled_work
To: Greg KH <[email protected]>
Cc: David Brownell <david-b-yBeKhBN/[email protected]>, USB list <[email protected]>, USB development list <linux-usb-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Message-ID: <Pine.LNX.4.44L0.0712111436550.6548-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>


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-nwvwT67g6+6dFdvTe/[email protected]>
CC: David Brownell <david-b-yBeKhBN/[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/core/hub.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -529,9 +529,9 @@ static void hub_quiesce(struct usb_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)


Patches currently in gregkh-2.6 which might be from stern-nwvwT67g6+6dFdvTe/[email protected] are

driver/pm-acquire-device-locks-prior-to-suspending.patch
driver/kobject-drop-child-parent-ref-at-unregistration.patch
driver/driver-core-fix-race-in-__device_release_driver.patch
driver/driver-core-fix-class-glue-dir-cleanup-logic.patch
usb/usb-storage-fix-devices-that-cannot-handle-32k-transfers.patch
usb/usb-usb-storage-new-lockable-subclass-0x07.patch
usb/usb-fix-locking-loop-by-avoiding-flush_scheduled_work.patch
usb/usb-usb-mon-mon_bin.c-cleanups.patch
usb/usb-revert-portions-of-unusual_dev-sync-up-some-reported-devices-from-ubuntu.patch
usb/usb-use-irqf_disabled-for-hcd-interrupt-handlers.patch
usb/usb-autosuspend-for-cdc-acm.patch
usb/usb-don-t-change-hc-power-state-for-a-freeze.patch
usb/usb-dummy_hcd-don-t-register-drivers-on-the-platform-bus.patch
usb/usb-force-handover-port-to-companion-when-hub_port_connect_change-fails.patch
usb/usb-make-ksuspend_usbd-thread-non-freezable.patch
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.