Thread (11 messages) 11 messages, 4 authors, 2021-11-23

Re: [RFT PATCH] usb: hub: Fix locking issues with address0_mutex

From: Mathias Nyman <hidden>
Date: 2021-11-23 09:17:07
Also in: stable

On 22.11.2021 14.27, Marek Szyprowski wrote:
Hi,

On 22.11.2021 11:50, Mathias Nyman wrote:
quoted
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: 6ae6dc22d2d1 ("usb: hub: Fix usb enumeration issue due to address0 race")
Cc: <redacted>
Signed-off-by: Mathias Nyman <redacted>
This fixes the issue I've reported here: 
https://lore.kernel.org/all/f3bfcbc7-f701-c74a-09bd-6491d4c8d863@samsung.com/ (local)
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Thank you for testing, I'll add these tags

-Mathias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help