[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb-devel
Subject:    [linux-usb-devel] [PATCH]cypress_cy7c63: race disconnect/sysfs
From:       Oliver Neukum <oneukum () suse ! de>
Date:       2007-03-30 8:52:16
Message-ID: 200703301052.16797.oneukum () suse ! de
[Download RAW message or body]

Hi,

this driver sets intfdata to NULL while it still can be read and happily followed.

	Regards
		OIiver
Signed-off-by: Oliver Neukum <oneukum@suse.de>
-- 
--- a/drivers/usb/misc/cypress_cy7c63.c	2007-03-30 10:09:05.000000000 +0200
+++ b/drivers/usb/misc/cypress_cy7c63.c	2007-03-30 10:09:10.000000000 +0200
@@ -246,11 +246,13 @@
 	struct cypress *dev;
 
 	dev = usb_get_intfdata(interface);
-	usb_set_intfdata(interface, NULL);
 
 	/* remove device attribute files */
 	device_remove_file(&interface->dev, &dev_attr_port0);
 	device_remove_file(&interface->dev, &dev_attr_port1);
+	/* the intfdata can be set to NULL only after the
+	 * device files have been removed */
+	usb_set_intfdata(interface, NULL);
 
 	usb_put_dev(dev->udev);
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic