]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: usb-skeleton: use irqsave() in USB's complete callback
authorJohn Ogness <john.ogness@linutronix.de>
Sun, 24 Jun 2018 22:08:39 +0000 (00:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 10:36:06 +0000 (19:36 +0900)
commit8982c8440f564549261fb80ca3fe1e3266635936
tree4931542eab4751ce3aead8b98914ec17b59432e5
parent0f5f7ace852ff172d77dfbbc89e6a86349f7f476
usb: usb-skeleton: 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.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usb-skeleton.c