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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
>> Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> Tested-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> 
> Regards,
> 
> Hans
> 

Thanks for testing, I'll add your tags and submit this.

-Mathias



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux