On Tue, 9 Sep 2014, Joe Lawrence wrote: > On Tue, 9 Sep 2014 11:30:24 -0400 > Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > > On Tue, 9 Sep 2014, Joe Lawrence wrote: > > > > In summary, khubd has initialized the usb_device maxchild to 8 and > > > provided backing-store for the usb_hub ports[] array. However, before > > > it gets to fill in pointers for each port[] entry, the device is removed > > > and the hotplug driver issues a pci_stop_bus_device. This removal > > > percolates all the way down to ehci_irq and usb_hc_died. When that goes > > > to mark the device as not attached, it expects that the ports[] pointers > > > are valid... kaboom. > > > > This has been fixed in the mainline kernel by commit d8521afe3586, > > which is part of a large series involving port-power control for USB-3 > > ports. You may want to apply just the portion that is relevant to this > > problem, namely, have hub_configure store the maxchild value in a > > local variable and don't assign it to hdev->maxchild until the port > > devices have safely been created. > > Thanks for the quick follow up, Alan. This is my first tour through > USB code so thanks for pointing me to the right commit. I'll try > applying the local maxchild change to hub_configure and report back. I > assume I can skip the usb_port_peer_mutex parts for now? If it's not present elsewhere in your kernel then yes, you can skip it. 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