linux-stable/drivers/usb
Mathias Nyman 816904fd87 usb: hub: Fix locking issues with address0_mutex
commit 6cca13de26 upstream.

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-12-01 09:04:40 +01:00
..
atm
c67x00
cdns3 usb: cdns3: fix race condition before setting doorbell 2021-09-14 10:32:41 +02:00
chipidea usb: chipidea: ci_hdrc_imx: fix potential error pointer dereference in probe 2021-12-01 09:04:40 +01:00
class USB: cdc-acm: fix break reporting 2021-10-05 13:50:52 +02:00
common Partially revert "usb: Kconfig: using select for USB_COMMON dependency" 2021-10-05 13:45:16 +02:00
core usb: hub: Fix locking issues with address0_mutex 2021-12-01 09:04:40 +01:00
dwc2 usb: dwc2: hcd_queue: Fix use of floating point literal 2021-12-01 09:04:39 +01:00
dwc3 usb: dwc3: gadget: Fix null pointer exception 2021-12-01 09:04:39 +01:00
early
gadget usb: gadget: hid: fix error code in do_config() 2021-11-18 19:16:51 +01:00
host usb: xhci: tegra: Check padctrl interrupt presence in device tree 2021-12-01 09:04:40 +01:00
image
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc USB: iowarrior: fix control-message timeouts 2021-11-18 19:16:08 +01:00
mon
mtu3 usb: mtu3: fix random remote wakeup 2021-08-26 13:41:52 +02:00
musb usb: musb: tusb6010: check return value after calling platform_get_resource() 2021-11-25 09:48:25 +01:00
phy usb: phy: tahvo: add IRQ check 2021-08-16 18:57:19 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles
serial USB: serial: option: add Fibocom FM101-GL variants 2021-12-01 09:04:39 +01:00
storage usb-storage: Add compatibility quirk flags for iODD 2531/2541 2021-11-12 15:05:48 +01:00
typec usb: typec: fusb302: Fix masking of comparator and bc_lvl interrupts 2021-12-01 09:04:40 +01:00
usbip usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c