linux/drivers/usb/core
Roel Kluin e4a3d94658 USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration()
While looping over the interfaces, if usb_hcd_alloc_bandwidth() fails it calls
hcd->driver->reset_bandwidth(), so there was no need to reinstate the interface
again.

If no break occurred, the index equals config->desc.bNumInterfaces. A
subsequent usb_control_msg() failure resulted in a read from
config->interface[config->desc.bNumInterfaces] at label reset_old_alts.

In either case the last interface should be skipped.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02 14:55:10 -08:00
..
buffer.c USB: pass mem_flags to dma_alloc_coherent 2009-04-23 14:15:28 -07:00
config.c USB: Fix SS endpoint companion descriptor parsing. 2009-09-23 06:46:18 -07:00
devices.c USB: Remove BKL from lseek implementations 2010-03-02 14:54:23 -08:00
devio.c USB: usbfs_snoop: add data logging back in 2010-03-02 14:54:37 -08:00
driver.c USB: remove debugging message for uevent constructions 2010-03-02 14:55:02 -08:00
endpoint.c PM: Allow USB devices to suspend/resume asynchronously 2010-02-26 20:39:12 +01:00
file.c USB: Push BKL on open down into the drivers 2010-03-02 14:54:23 -08:00
generic.c USB: Convert a dev_info to a dev_dbg 2009-12-11 11:55:13 -08:00
hcd-pci.c USB: implement non-tree resume ordering constraints for PCI host controllers 2010-02-26 20:39:12 +01:00
hcd.c USB: fix the idProduct value for USB-3.0 root hubs 2010-03-02 14:55:07 -08:00
hcd.h USB: Move hcd free_dev call into usb_disconnect to fix oops 2010-03-02 14:54:13 -08:00
hub.c USB hub: make USB device id constant 2010-03-02 14:54:17 -08:00
hub.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
inode.c const: mark remaining super_operations const 2009-09-22 07:17:24 -07:00
Kconfig USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00
Makefile USB: add the usbfs devices file to debugfs 2009-06-15 21:44:43 -07:00
message.c USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration() 2010-03-02 14:55:10 -08:00
notify.c USB : correct comments in usb/core/notify.c 2008-02-01 14:34:44 -08:00
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c USB: change handling of negative autosuspend delays 2010-03-02 14:54:11 -08:00
sysfs.c USB: change handling of negative autosuspend delays 2010-03-02 14:54:11 -08:00
urb.c USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS 2010-03-02 14:53:36 -08:00
usb.c USB: Move hcd free_dev call into usb_disconnect to fix oops 2010-03-02 14:54:13 -08:00
usb.h USB: convert to the runtime PM framework 2010-03-02 14:54:12 -08:00