[PATCH]cypress_cy7c63: race disconnect/sysfs read-write leading to following NULL pointer
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Novell |
| Message-ID | <[email protected]> |
Hi, this driver sets intfdata to NULL while it still can be read and happily followed. Regards OIiver Signed-off-by: Oliver Neukum <[email protected]> -- --- 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 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel