usb: core: use irqsave() in sg_complete() complete callback
commit31adcb0a9cba3b7e3560c6364aaa8d0060764e12
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 24 Jun 2018 22:08:36 +0000 (25 00:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 10:36:06 +0000 (28 19:36 +0900)
treebaff25840aab0c17f94c565548763afc81708f1e
parent4685be25a19078de6301f50bde7a755483805269
usb: core: use irqsave() in sg_complete() 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.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/message.c