Re: Bug 153551: Kernel panic on Nexus 5X USB unplug while tethering

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

 



On Wed, 24 Aug 2016, Mathias Nyman wrote:

> 
> >> Reference counting is supposed to keep everything important from being
> >> deallocated until all the releases are finished.  In particular, if the
> >> hcd structure was already deallocated when usb_put_hcd() was called
> >> then there is a refcounting bug somewhere.
> >
> > That seems like a possible cause, I'll look into the refcouting.
> >
> > This helps a lot. I was getting stuck with that bug.
> > Thanks
> 
> Just to update on this,
> It appears to be caused by the same address and bandwidth mutex free bug that you
> already fixed in ab2a4bf USB: don't free bandwidth_mutex too early

Yeah, that's the commit which resets the peer->primary_hcd pointer 
when a shared hcd is released.

> The sleep() worked as it delayed freeing the primary hcd, changing the
> order to first release usb3 hcd and then usb2 hcd.

Does this mean that the patch you already posted is the proper fix?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux