ChangeSet 1.1807.48.42, 2004/08/05 15:00:22-07:00, [EMAIL PROTECTED] [PATCH] USB: fix deadlock in hub_reset
usb_reset_device takes hdev->serialize. However, hub_reset is (only) called by hub_events, which already holds the lock. Thanks to Tyler Nielsen for the bug report and helpful backtrace. Signed-off-by: Duncan Sands <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/usb/core/hub.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c 2004-08-23 13:18:19 -07:00 +++ b/drivers/usb/core/hub.c 2004-08-23 13:18:19 -07:00 @@ -794,7 +794,7 @@ } } -/* caller has locked the hub */ +/* caller has locked the hub and must own the device lock */ static int hub_reset(struct usb_hub *hub) { struct usb_device *hdev = hub->hdev; @@ -812,7 +812,7 @@ else return -1; - if (usb_reset_device(hdev)) + if (__usb_reset_device(hdev)) return -1; hub->urb->dev = hdev; ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel