Commit:     949ce47168a34618c3e24cb7dd4ab52233a4653c
Parent:     4edf2c83637b9e9db771cc5629de036fe4488564
Author:     Oliver Neukum <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 30 10:52:16 2007 +0200
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:28:38 2007 -0700

    USB: cypress_cy7c63: race disconnect/sysfs read-write leading to following 
NULL pointer
    this driver sets intfdata to NULL while it still can be read and happily 
    Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/usb/misc/cypress_cy7c63.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/misc/cypress_cy7c63.c 
index b63b5f3..d721380 100644
--- a/drivers/usb/misc/cypress_cy7c63.c
+++ b/drivers/usb/misc/cypress_cy7c63.c
@@ -246,11 +246,13 @@ static void cypress_disconnect(struct usb_interface 
        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);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to