Am Freitag, 20. November 2009 22:22:59 schrieb Dmitry Torokhov: > Hi Oliver, > > On Fri, Nov 20, 2009 at 10:13:47PM +0100, Oliver Neukum wrote: > > Hi, > > > > an open() between killing the urb and unregistering the device > > can lead to IO to a disconnected device. > > usbtouch_close() calls usb_kill_urb() so there is no race. > usb_kill_urb() simply not needed in usbtouch_disconnect(). Then it needs to go. Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx> Regards Oliver -- commit 2705666144b8c898283974efc59fd5182e13e652 Author: Oliver Neukum <oliver@xxxxxxxxxx> Date: Fri Nov 20 22:41:04 2009 +0100 usbtouchscreen:remove unneeded usb_kill_urb usb_kill_urb() in disconnect is not needed as unregistering cause close to be called diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 68ece58..eddb628 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1087,7 +1087,7 @@ static void usbtouch_disconnect(struct usb_interface *intf) dbg("%s - usbtouch is initialized, cleaning up", __func__); usb_set_intfdata(intf, NULL); - usb_kill_urb(usbtouch->irq); + /* this will stop IO via close */ input_unregister_device(usbtouch->input); usb_free_urb(usbtouch->irq); usbtouch_free_buffers(interface_to_usbdev(intf), usbtouch); -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html