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

2016-08-25 Thread Jose Marino
On 08/25/2016 05:09 AM, Mathias Nyman wrote: On 24.08.2016 17:14, Alan Stern wrote: On Wed, 24 Aug 2016, Mathias Nyman wrote: 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

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

2016-08-25 Thread Mathias Nyman
On 24.08.2016 17:14, Alan Stern wrote: On Wed, 24 Aug 2016, Mathias Nyman wrote: 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? Not sure, still

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

2016-08-24 Thread Alan Stern
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

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

2016-08-24 Thread Mathias Nyman
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

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 19:14, Jose Marino wrote: On 08/23/2016 06:36 AM, Mathias Nyman wrote: On 23.08.2016 14:26, Mathias Nyman wrote: On 23.08.2016 13:54, Mathias Nyman wrote: On 23.08.2016 02:21, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 18:10, Alan Stern wrote: On Tue, 23 Aug 2016, Mathias Nyman wrote: The Dell XPS 9550 has an additional xhci controller for handling the type-C port. This controller is hotplug removed from the PCI bus when the last USB type-c device is disconnected. xhci driver, and usb core it

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 17:53, Alan Stern wrote: On Tue, 23 Aug 2016, Mathias Nyman wrote: Or then this happens: (I'll call the hcds usb2_hcd and usb3_hcd to keep track of them, usb2_hcd is the primary_hcd) to begin with: Actually, to begin with neither usb2_hcd nor usb3_hcd exists. Then usb2_hcd

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 16:13, Greg KH wrote: On Tue, Aug 23, 2016 at 01:54:05PM +0300, Mathias Nyman wrote: On 23.08.2016 02:21, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone through the USB-C connection and in

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

2016-08-23 Thread Jose Marino
On 08/23/2016 06:36 AM, Mathias Nyman wrote: On 23.08.2016 14:26, Mathias Nyman wrote: On 23.08.2016 13:54, Mathias Nyman wrote: On 23.08.2016 02:21, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone

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

2016-08-23 Thread Jose Marino
On 08/23/2016 01:57 AM, Oliver Neukum wrote: On Mon, 2016-08-22 at 17:21 -0600, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone through the USB-C connection and in the phone I select USB tethering.

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

2016-08-23 Thread Alan Stern
On Tue, 23 Aug 2016, Mathias Nyman wrote: > The Dell XPS 9550 has an additional xhci controller for handling the type-C > port. > This controller is hotplug removed from the PCI bus when the last USB type-c > device is disconnected. > > xhci driver, and usb core it seems is not really designed

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

2016-08-23 Thread Alan Stern
On Tue, 23 Aug 2016, Mathias Nyman wrote: > Or then this happens: > (I'll call the hcds usb2_hcd and usb3_hcd to keep track of them, usb2_hcd is > the primary_hcd) > > to begin with: Actually, to begin with neither usb2_hcd nor usb3_hcd exists. Then usb2_hcd is registered, at which point we

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

2016-08-23 Thread Greg KH
On Tue, Aug 23, 2016 at 01:54:05PM +0300, Mathias Nyman wrote: > On 23.08.2016 02:21, Jose Marino wrote: > > I'm using my phone (Nexus 5X running Android) to tether a USB connection to > > my laptop (XPS 15 9550). I plug the phone through the USB-C connection and > > in the phone I select USB

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 14:26, Mathias Nyman wrote: On 23.08.2016 13:54, Mathias Nyman wrote: On 23.08.2016 02:21, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone through the USB-C connection and in the phone I

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 13:54, Mathias Nyman wrote: On 23.08.2016 02:21, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone through the USB-C connection and in the phone I select USB tethering. Initially things look

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

2016-08-23 Thread Mathias Nyman
On 23.08.2016 02:21, Jose Marino wrote: I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone through the USB-C connection and in the phone I select USB tethering. Initially things look normal: a usb0 network interface appears

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

2016-08-23 Thread Oliver Neukum
On Mon, 2016-08-22 at 17:21 -0600, Jose Marino wrote: > I'm using my phone (Nexus 5X running Android) to tether a USB connection > to my laptop (XPS 15 9550). I plug the phone through the USB-C > connection and in the phone I select USB tethering. Initially things > look normal: a usb0 network

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

2016-08-22 Thread Jose Marino
I'm using my phone (Nexus 5X running Android) to tether a USB connection to my laptop (XPS 15 9550). I plug the phone through the USB-C connection and in the phone I select USB tethering. Initially things look normal: a usb0 network interface appears in the laptop and it tries to get an IP