Re: [PATCH v3 2/2] usb: roles: serialize registered checks and unregister under sw->lock
From: Ilia Snezhkov
Date: Fri Dec 04 2026 - 06:19:02 EST
Hi Heikki,
On Fri, Dec 04, 2026 at 11:09:59AM +0100, Heikki Krogerus wrote:
> Sorry, I failed to notice this before, but with guard(mutex) you can
> avoid adding the label.
Thanks for the review. While preparing v4, I noticed that Keisuke
Tsukuda's earlier series fixing the same race was already applied to
usb-testing as:
2480026d552e ("usb: dwc3: apple: unregister role switch before taking lock")
3fa9acc765d2 ("usb: roles: wait for callbacks on unregister")
I am dropping this duplicate series. If you would still like a
follow-up patch on top of usb-testing converting
usb_role_switch_{set,get}_role() to guard(mutex) and documenting the
lock-ordering contract on usb_role_switch_unregister(), I am happy to
send one.
Best regards,
Ilia