mirror-linux/drivers/usb/core
Mathias Nyman 6cca13de26 usb: hub: Fix locking issues with address0_mutex
Fix the circular lock dependency and unbalanced unlock of addess0_mutex
introduced when fixing an address0_mutex enumeration retry race in commit
ae6dc22d2d1 ("usb: hub: Fix usb enumeration issue due to address0 race")

Make sure locking order between port_dev->status_lock and address0_mutex
is correct, and that address0_mutex is not unlocked in hub_port_connect
"done:" codepath which may be reached without locking address0_mutex

Fixes: 6ae6dc22d2 ("usb: hub: Fix usb enumeration issue due to address0 race")
Cc: <stable@vger.kernel.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20211123101656.1113518-1-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-23 14:05:28 +01:00
..
Kconfig
Makefile
buffer.c
config.c usb: core: config: Change sizeof(struct ...) to sizeof(*...) 2021-10-06 08:25:47 +02:00
devices.c usb: common: add function to get interval expressed in us unit 2021-03-10 09:37:17 +01:00
devio.c USB: core: Make do_proc_control() and do_proc_bulk() killable 2021-09-14 11:55:22 +02:00
driver.c USB: core: rename usb_driver_claim_interface() data parameter 2021-03-23 12:39:39 +01:00
endpoint.c usb: common: add function to get interval expressed in us unit 2021-03-10 09:37:17 +01:00
file.c
generic.c
hcd-pci.c
hcd.c Revert "usb: core: hcd: Add support for deferring roothub registration" 2021-11-05 08:41:02 +01:00
hub.c usb: hub: Fix locking issues with address0_mutex 2021-11-23 14:05:28 +01:00
hub.h usb: core: reduce power-on-good delay time of root hub 2021-04-10 10:45:48 +02:00
ledtrig-usbport.c
message.c USB: core: Avoid WARNings for 0-length descriptor requests 2021-06-09 11:11:39 +02:00
notify.c
of.c
otg_productlist.h
phy.c
phy.h
port.c Revert "usb: Link the ports to the connectors they are attached to" 2021-04-12 14:36:02 +02:00
quirks.c Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem" 2021-07-21 11:36:34 +02:00
sysfs.c driver core: Move the "removable" attribute from USB to core 2021-05-27 09:36:31 +02:00
urb.c USB: core: Check buffer length matches wLength for control transfers 2021-05-27 13:46:21 +02:00
usb-acpi.c
usb.c usb: Iterator for ports 2021-04-09 16:00:00 +02:00
usb.h