提交 6d779768 编写于 作者: O Oliver Neukum 提交者: Jiri Kosina

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: NValdis Kletniks <Valdis.Kletnieks@vt.edu>
Signed-off-by: NOliver Neukum <oliver@neukum.name>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 ae2f0074
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册