On Fri, Sep 20, 2002 at 03:55:31PM -0400, Alan Stern wrote:
> Greg:
> 
> Perusing the BitKeeper source archive for usb-2.4, I found two serious
> errors in driver/usb/hub.c.  One of them is responsible for
> oopses that have been reported to the linux-usb-devel mailing list.
> 
> Unfortunately, I can't tell you the line numbers, but they are very near
> the end of the file, in the usb_reset_device() routine.  The first bug is
> the line

<snip>

Good catch.  Here's the patch for these:

thanks,

greg k-h


diff -Nru a/drivers/usb/hub.c b/drivers/usb/hub.c
--- a/drivers/usb/hub.c Fri Sep 20 13:03:57 2002
+++ b/drivers/usb/hub.c Fri Sep 20 13:03:57 2002
@@ -1055,8 +1055,8 @@
        if (!descriptor) {
                return -ENOMEM;
        }
-       ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &descriptor,
-                       sizeof(descriptor));
+       ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor,
+                       sizeof(*descriptor));
        if (ret < 0)
                return ret;
 
@@ -1065,7 +1065,7 @@
        le16_to_cpus(&descriptor->idProduct);
        le16_to_cpus(&descriptor->bcdDevice);
 
-       if (memcmp(&dev->descriptor, descriptor, sizeof(descriptor))) {
+       if (memcmp(&dev->descriptor, descriptor, sizeof(*descriptor))) {
                kfree(descriptor);
                usb_destroy_configuration(dev);
 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to