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 05:30:10 +0000 (21:30 -0800)
commit2efc229a0ec1b247e8c2ca5069d22252e792333a
tree26a54af9ced0a7205a1b90df4465549d720c9117
parent9021ee52db43b0966d04d75b28a8c9e07362df49
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