Files
kernel-tenderloin-3.0/include/linux
Oliver Neukum 69626f23bc HID: fix race between open() and disconnect() in usbhid
There is a window:

task A					task B
spin_lock_irq(&usbhid->inlock);	/* Sync with error handler */
usb_set_intfdata(intf, NULL);
spin_unlock_irq(&usbhid->inlock);
usb_kill_urb(usbhid->urbin);
usb_kill_urb(usbhid->urbout);
usb_kill_urb(usbhid->urbctrl);

del_timer_sync(&usbhid->io_retry);
cancel_work_sync(&usbhid->reset_work);

						if (!hid->open++) {
							res = usb_autopm_get_interface(usbhid->intf);
							if (res < 0) {
								hid->open--;
								return -EIO;
							}
						}
						if (hid_start_in(hid))

if (hid->claimed & HID_CLAIMED_INPUT)
	hidinput_disconnect(hid);

in which an open() to an already disconnected device will submit an URB
to an undead device. In case disconnect() was called by an ioctl, this'll
oops. Fix by introducing a new flag and checking it in hid_start_in().

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-04-22 11:34:58 +02:00
..
2008-02-14 21:17:08 -08:00
2008-02-05 09:44:13 -08:00
2008-02-10 18:11:16 -05:00
2008-02-05 03:20:13 -08:00
2008-02-06 10:41:02 -08:00
2008-02-19 10:04:00 +01:00
2008-03-04 13:41:23 +01:00
2008-04-19 09:59:43 +10:00
2008-02-03 17:45:46 +02:00
2008-04-17 20:05:38 +02:00
2008-03-04 16:35:12 -08:00
2008-02-14 20:58:05 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-03-04 14:47:06 -08:00
2008-02-08 02:09:56 +00:00
2008-04-21 22:38:45 +00:00
2008-02-08 09:22:24 -08:00
2008-04-19 19:19:54 +02:00
2008-02-07 08:42:30 -08:00
2008-02-05 09:44:19 -08:00
2008-04-04 18:36:49 +02:00
2008-04-17 12:22:31 +02:00
2008-02-13 16:21:18 -08:00
2008-02-07 20:39:44 -05:00
2008-03-17 22:48:46 -07:00
2008-02-19 21:00:18 +01:00
2008-04-19 19:10:28 -07:00
2008-04-17 20:05:42 +02:00
2008-04-19 19:44:57 +02:00
2008-04-19 19:10:28 -07:00
2008-02-03 17:45:46 +02:00
2008-04-15 21:22:17 +10:00
2008-02-06 10:41:01 -08:00
2008-02-26 14:03:47 +09:00
2008-03-04 16:35:15 -08:00
2008-03-12 12:34:37 -07:00
2008-04-21 22:35:29 +00:00
2008-02-08 09:22:31 -08:00
2008-02-14 21:13:33 -08:00
2008-02-14 21:13:33 -08:00
2008-04-20 21:47:03 -07:00
2008-04-20 21:47:03 -07:00
2008-04-20 21:47:07 -07:00
2008-02-02 02:44:34 +03:00
2008-02-07 23:11:56 -08:00
2008-03-17 22:46:46 -07:00
2008-02-08 09:22:31 -08:00
2008-02-08 09:22:26 -08:00
2008-04-17 10:42:14 -04:00
2008-02-05 09:44:22 -08:00
2008-02-08 09:22:41 -08:00
2008-04-17 10:43:01 -04:00
2008-02-07 08:42:34 -08:00
2008-02-07 08:42:30 -08:00
2008-02-08 09:22:41 -08:00
2008-02-08 09:22:27 -08:00
2008-02-07 08:42:34 -08:00
2008-04-19 19:44:59 +02:00
2008-04-17 20:05:37 +02:00
2008-02-07 08:42:16 -08:00
2008-04-17 20:05:36 +02:00
2008-02-08 09:22:34 -08:00
2008-02-08 09:22:36 -08:00
2008-03-04 14:57:43 -08:00
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-04-07 13:14:22 -07:00
2008-02-06 10:41:03 -08:00
2008-03-06 15:30:40 -05:00