usb: ehci: fix deadlock when threadirqs option is used
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 19 Feb 2014 09:29:01 +0000 (10:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 06:06:24 +0000 (22:06 -0800)
commit9995c904987d740b0457317b1d8c08968af7263a
treef6682c7684b313faf2364403ad95c8825ebf7c26
parentaa0346d71ecec4b91cd48d35fcaa992c986a38ed
usb: ehci: fix deadlock when threadirqs option is used

commit a1227f3c1030e96ebc51d677d2f636268845c5fb upstream.

ehci_irq() and ehci_hrtimer_func() can deadlock on ehci->lock when
threadirqs option is used. To prevent the deadlock use
spin_lock_irqsave() in ehci_irq().

This change can be reverted when hrtimer callbacks become threaded.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c