On Tue, Jul 10, 2007 at 12:44:59PM -0700, [EMAIL PROTECTED] wrote: > If called and the device is not authorized to be used, then we don't > allow reading the configurations. > > Signed-off-by: Inaky Perez-Gonzalez <[EMAIL PROTECTED]> > > --- > drivers/usb/core/config.c | 21 +++++++++++++++++---- > 1 file changed, 17 insertions(+), 4 deletions(-) > > Index: linux.hg/drivers/usb/core/config.c > =================================================================== > --- linux.hg.orig/drivers/usb/core/config.c 2007-07-09 14:16:36.000000000 > -0700 > +++ linux.hg/drivers/usb/core/config.c 2007-07-09 14:16:39.000000000 > -0700 > @@ -471,8 +471,16 @@ > } > > > -// hub-only!! ... and only in reset path, or usb_new_device() > -// (used by real hubs and virtual root hubs) > +/* > + * Get the USB config descriptors, cache and parse'em > + * > + * hub-only!! ... and only in reset path, or usb_new_device() > + * (used by real hubs and virtual root hubs) > + * > + * NOTE: if this is a WUSB device and is not authorized, we skip the > + * whole thing. A non-authorized USB device has no > + * configurations. > + */ > int usb_get_configuration(struct usb_device *dev) > { > struct device *ddev = &dev->dev; > @@ -509,14 +517,18 @@ > goto err2; > desc = (struct usb_config_descriptor *)buffer; > > - for (cfgno = 0; cfgno < ncfg; cfgno++) { > + cfgno = 0; > + result = 0; > + if (dev->authorized == 0) > + goto out_not_authorized;
So far in this sequence of patches, nothing has set ->authorized to anything other than 0, so this will break all existing USB devices, right? If so, care to reorder these patches so that nothing breaks if you bisect them? thanks, greg k-h ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel