[linux-usb-devel] [PATCH 1/9] USB usbfs: take a reference to the usb device

[linux-usb-devel] [PATCH 1/9] USB usbfs: take a reference to the usb device

Post by Oliver Neu » Wed, 28 Apr 2004 18:10:23


Am Dienstag, 27. April 2004 00:14 schrieb Greg KH:


You aren't nice that way. An oops has localised consequences. Scribbling
over memory can cause anything.

Regards
Oliver

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[linux-usb-devel] [PATCH 1/9] USB usbfs: take a reference to the usb device

Post by Duncan San » Sat, 01 May 2004 18:10:12


Hi Greg, if won't accept a BUG_ON, how about the following?

--- usb-2.6/drivers/usb/core/devio.c.orig 2004-04-30 11:36:17.000000000 +0200
+++ usb-2.6/drivers/usb/core/devio.c 2004-04-30 12:01:37.000000000 +0200
@@ -350,8 +350,11 @@
* all pending I/O requests; 2.6 does that.
*/

- WARN_ON(ifnum >= 8*sizeof(ps->ifclaimed));
- clear_bit(ifnum, &ps->ifclaimed);
+ if (likely(ifnum < 8*sizeof(ps->ifclaimed)))
+ clear_bit(ifnum, &ps->ifclaimed);
+ else
+ warn("interface number %u out of range", ifnum);
+
usb_set_intfdata (intf, NULL);

/* force async requests to complete */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

 
 
 

[linux-usb-devel] [PATCH 1/9] USB usbfs: take a reference to the usb device

Post by Greg K » Mon, 03 May 2004 08:20:07


Fine with me, applied, thanks.

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/