Thread (2 messages) 2 messages, 2 authors, 2008-06-26

Re: [patch]fix race between disconnect and open in usbtouch

From: Alan Stern <stern@rowland.harvard.edu>
Date: 2008-06-26 14:46:13

Possibly related (same subject, not in this thread)

On Thu, 26 Jun 2008, Ville Syrjälä wrote:
quoted
--- linux-2.6.26-sierra/drivers/input/touchscreen/usbtouchscreen.c.alt	2008-06-26 15:23:34.000000000 +0200
+++ linux-2.6.26-sierra/drivers/input/touchscreen/usbtouchscreen.c	2008-06-26 15:23:38.000000000 +0200
@@ -973,8 +973,8 @@ static void usbtouch_disconnect(struct u
 
 	dbg("%s - usbtouch is initialized, cleaning up", __FUNCTION__);
 	usb_set_intfdata(intf, NULL);
-	usb_kill_urb(usbtouch->irq);
 	input_unregister_device(usbtouch->input);
+	usb_kill_urb(usbtouch->irq);
 	usb_free_urb(usbtouch->irq);
 	usbtouch_free_buffers(interface_to_usbdev(intf), usbtouch);
 	kfree(usbtouch);
I think you can just remove that usb_kill_urb() call since
usbtouch_close() has already called it by that time.
How do you know that usbtouch_close has been called at this point?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help