Re: crash in recursively_mark_NOTATTACHED

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

 



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?

-- Joe
--
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