Re: Recursive locking bug in Linux 3.19 USB stack

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

 



On Thu, 14 May 2015, Petri Gynther wrote:

> linux-usb:
> 
> I'm seeing the following recursive locking issue in Linux 3.19 USB stack.
> 
> This happens on every boot on BCM7xxxx (MIPS) STB board with Dell 30"
> monitor's built-in USB hub connected to the BCM7xxx USB port.
> 
> I think the problem is:
> ehci_irq()
>   spin_lock_irqsave(&ehci->lock, flags);
>   ...
>   if (bh) ehci_work (ehci);
>    ...
>    hub_irq()
>      ehci_urb_enqueue()
>        intr_submit()
>          spin_lock_irqsave (&ehci->lock, flags);
> 
> I can't test the 4.1-rc code immediately, but looking at the code, the
> same issue is present there.
> 
> Any suggestions on how to fix this?

The trick here is that hub_irq() and all the stuff beneath it is 
supposed to execute in a tasklet, not in the same context as 
ehci_irq().  Consequently the lock should not be taken recursively.

Perhaps your EHCI platform driver has forgotten to include the HCD_BH
bit in the .flags member of its hc_driver structure.  Which driver are
you using?  Running "grep EHCI" on the kernel config file should 
provide the answer.

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