]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
usb: legousbtower: use irqsave() in USB's complete callback
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 24 Jun 2018 22:08:45 +0000 (00:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 10:36:07 +0000 (19:36 +0900)
commit4327059a14bb6d9578bfb82a6b7c59b3bbf78335
treebfc99177a99ca36c01645c64df1c06eb9b57bd58
parentd7cdbdd024d978b9002a20223cc384d11a0a03ea
usb: legousbtower: use irqsave() in USB's complete callback

The USB completion callback does not disable interrupts while acquiring
the lock. We want to remove the local_irq_disable() invocation from
__usb_hcd_giveback_urb() and therefore it is required for the callback
handler to disable the interrupts while acquiring the lock.
The callback may be invoked either in IRQ or BH context depending on the
USB host controller.
Use the _irqsave() variant of the locking primitives.

Cc: Juergen Stuber <starblue@users.sourceforge.net>
Cc: legousb-devel@lists.sourceforge.net
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/legousbtower.c