summaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-core.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2011-10-13 18:21:58 +0200
committerJiri Kosina <jkosina@suse.cz>2011-10-13 18:21:58 +0200
commitfad9fbe8651e8abd9794d4b4c4133241aa3093b5 (patch)
tree3d7fe18ab3d42e000c557e2b2f9da5d80b95ae99 /drivers/hid/usbhid/hid-core.c
parent3797ef6b6bc041755318917855d63879679c6dd9 (diff)
downloadlinux-fad9fbe8651e8abd9794d4b4c4133241aa3093b5.tar.gz
linux-fad9fbe8651e8abd9794d4b4c4133241aa3093b5.tar.bz2
linux-fad9fbe8651e8abd9794d4b4c4133241aa3093b5.zip
HID: usbhid: cancel timer for retry synchronously
This makes sure IO is never restarted while a reset is going on In particular there seems to be no protection from hid_retry_timeout() calling hid_start_in() which would start IO after hid_pre_reset() has already called hid_cease_io() because that uses del_timer(), not del_timer_sync() Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hid-core.c')
-rw-r--r--drivers/hid/usbhid/hid-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index ad978f5748d3..77e705c2209c 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1270,7 +1270,7 @@ static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid)
static void hid_cease_io(struct usbhid_device *usbhid)
{
- del_timer(&usbhid->io_retry);
+ del_timer_sync(&usbhid->io_retry);
usb_kill_urb(usbhid->urbin);
usb_kill_urb(usbhid->urbctrl);
usb_kill_urb(usbhid->urbout);