diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-03-22 18:01:49 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-03-25 17:57:58 +0100 |
commit | 6d77976800c3f29a0337fadcc9ddd79050fa5620 (patch) | |
tree | 3618f5fef912ba9568e24d7df1d562e1ec7fd862 | |
parent | ae2f007468223e9efd6973be0364b9307a050a0c (diff) | |
download | op-kernel-dev-6d77976800c3f29a0337fadcc9ddd79050fa5620.zip op-kernel-dev-6d77976800c3f29a0337fadcc9ddd79050fa5620.tar.gz |
HID: autosuspend -- fix lockup of hid on reset
This fixes a use of flush_scheduled_work() in USB HID's reset logic that can
deadlock.
Tested-by: Valdis Kletniks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 054f0c5..a1ef41f 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -1207,7 +1207,6 @@ static void hid_cease_io(struct usbhid_device *usbhid) usb_kill_urb(usbhid->urbin); usb_kill_urb(usbhid->urbctrl); usb_kill_urb(usbhid->urbout); - flush_scheduled_work(); } /* Treat USB reset pretty much the same as suspend/resume */ @@ -1219,6 +1218,7 @@ static int hid_pre_reset(struct usb_interface *intf) spin_lock_irq(&usbhid->lock); set_bit(HID_RESET_PENDING, &usbhid->iofl); spin_unlock_irq(&usbhid->lock); + cancel_work_sync(&usbhid->restart_work); hid_cease_io(usbhid); return 0; |