From oliver@neukum.name Fri Nov 24 03:56:32 2006 Date: Fri, 24 Nov 2006 12:55:59 +0100 (MET) From: Oliver Neukum To: gregkh@suse.com, linux-usb-devel@lists.sourceforge.net, Subject: USB: fix transvibrator disconnect race MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Message-Id: <200611241241.23341.oliver@neukum.name> in disconnect you set the interface's private data to NULL. In your IO methods you unconditionally follow the pointer into never never land. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/trancevibrator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- gregkh-2.6.orig/drivers/usb/misc/trancevibrator.c +++ gregkh-2.6/drivers/usb/misc/trancevibrator.c @@ -120,8 +120,8 @@ static void tv_disconnect(struct usb_int struct trancevibrator *dev; dev = usb_get_intfdata (interface); - usb_set_intfdata(interface, NULL); device_remove_file(&interface->dev, &dev_attr_speed); + usb_set_intfdata(interface, NULL); usb_put_dev(dev->udev); kfree(dev); }