OSDN Git Service

usb: cdc-wdm: use irqsave() in USB's complete callback
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 24 Jun 2018 22:08:35 +0000 (00:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 10:36:07 +0000 (19:36 +0900)
commit579b9cca2bff170ac4c4487de6e8ebff7906b3a6
treec9a7543b9a89e14fc130f3525e46ee3dda10966f
parent24b2068e26c6f24de05c81459553cbc6cf753708
usb: cdc-wdm: 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: Oliver Neukum <oneukum@suse.com>
Cc: "Bjørn Mork" <bjorn@mork.no>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c