All of
 help / color / mirror / Atom feed
From: Oliver Neukum <>
	Ondrej Zary
	Jiri Kosina <>,
	Daniel Ritz <>,
	Dmitry Torokhov <dt>
Subject: [patch]race between disconnect and open in usbtouchscreen
Date: Fri, 20 Nov 2009 22:13:47 +0100	[thread overview]
Message-ID: <> (raw)


an open() between killing the urb and unregistering the device
can lead to IO to a disconnected device.


Signed-off-by: Oliver Neukum <>


commit e15f9b41115356ca5399f77bbc6b364c41b7f780
Author: Oliver Neukum <>
Date:   Fri Nov 20 21:50:38 2009 +0100

    usbtouchscreen: fix race between open and disconnect
    the input device must be unregistered before IO is stopped
    so that open cannot restart IO

diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 68ece58..6850b0d 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -1087,8 +1087,8 @@ 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);
+	usb_kill_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
More majordomo info at

             reply	other threads:[~2009-11-20 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 21:13 Oliver Neukum [this message]
2009-11-20 21:22 ` [patch]race between disconnect and open in usbtouchscreen Dmitry Torokhov
2009-11-20 21:49   ` Oliver Neukum
2009-11-23 17:21     ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.