From: Oliver Neukum Date: Fri, 24 Nov 2006 11:55:59 +0000 (+0100) Subject: USB: fix transvibrator disconnect race X-Git-Tag: MMI-PSA29.97-13-9~45816^2~32 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git USB: fix transvibrator disconnect race 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 --- diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index 33cd91d11eca..67e2fc20eeeb 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c @@ -120,8 +120,8 @@ static void tv_disconnect(struct usb_interface *interface) 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); }