From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
m.szyprowski@samsung.com, gregkh@linuxfoundation.org,
stern@rowland.harvard.edu, kishon@ti.com
Cc: chris.chiu@canonical.com, linux-usb@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [RFT PATCH] usb: hub: Fix locking issues with address0_mutex
Date: Tue, 23 Nov 2021 11:31:04 +0200 [thread overview]
Message-ID: <29620153-d829-d31e-6f2b-a4093f040b84@linux.intel.com> (raw)
In-Reply-To: <132b6778-91e7-d758-2636-9561e5aa347f@redhat.com>
On 22.11.2021 17.41, Hans de Goede wrote:
> Hi,
>
> On 11/22/21 11:50, Mathias Nyman wrote:
>> 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: <stable@vger.kernel.org>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
> Oh, this is great, with this patch I can finally hot-plug my
> thunderbolt dock (and thus a XHCI controller) without the XHCI
> controller given a whole bunch of weird errors (and some USB
> devices not working), which it does not when already connected at boot.
>
> I also tried the hotplug thingy with the previous fix without
> this locking fix and then I actually hit the deadlock and things
> like lsusb would hang.
>
> If we can get these 2 fixes together merged soon and also backported
> to the stable series that would be great:
>
> Acked-by: Hans de Goede <hdegoede@redhat.com>
> Tested-by: Hans de Goede <hdegoede@redhat.com>
>
> Regards,
>
> Hans
>
Thanks for testing, I'll add your tags and submit this.
-Mathias
prev parent reply other threads:[~2021-11-23 9:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20211118111915eucas1p2cf4a502442e7259c6c347daf0d87259e@eucas1p2.samsung.com>
2021-11-15 22:16 ` [PATCH] usb: hub: Fix usb enumeration issue due to address0 race Mathias Nyman
2021-11-16 8:22 ` Greg KH
2021-11-16 8:39 ` Mathias Nyman
2021-11-18 11:19 ` Marek Szyprowski
2021-11-18 13:50 ` Mathias Nyman
2021-11-22 10:44 ` Mathias Nyman
2021-11-22 10:50 ` [RFT PATCH] usb: hub: Fix locking issues with address0_mutex Mathias Nyman
2021-11-22 12:27 ` Marek Szyprowski
2021-11-23 9:18 ` Mathias Nyman
2021-11-22 15:41 ` Hans de Goede
2021-11-23 9:31 ` Mathias Nyman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29620153-d829-d31e-6f2b-a4093f040b84@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=chris.chiu@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=kishon@ti.com \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox