aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2018-09-10 05:20:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-10 13:35:46 -0400
commited194d1367698a0872a2b75bbe06b3932ce9df3a (patch)
tree74733668ae8a526023e7be641b77ad562d387e9b
parent3f3ff6e0d881366bf7721fd5cf36c16068107138 (diff)
usb: core: remove local_irq_save() around ->complete() handler
The core disabled interrupts before invocation the ->complete handler because the handler might have expected that interrupts are disabled. All handlers were audited and use proper locking now. With it, the core code no longer needs to disable interrupts before invoking the ->complete handler. Remove local_irq_save() statement before invoking the ->complete handler. 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>
-rw-r--r--drivers/usb/core/hcd.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 1c21955fe7c0..f985d2303095 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1755,20 +1755,7 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
1755 1755
1756 /* pass ownership to the completion handler */ 1756 /* pass ownership to the completion handler */
1757 urb->status = status; 1757 urb->status = status;
1758
1759 /*
1760 * We disable local IRQs here avoid possible deadlock because
1761 * drivers may call spin_lock() to hold lock which might be
1762 * acquired in one hard interrupt handler.
1763 *
1764 * The local_irq_save()/local_irq_restore() around complete()
1765 * will be removed if current USB drivers have been cleaned up
1766 * and no one may trigger the above deadlock situation when
1767 * running complete() in tasklet.
1768 */
1769 local_irq_save(flags);
1770 urb->complete(urb); 1758 urb->complete(urb);
1771 local_irq_restore(flags);
1772 1759
1773 usb_anchor_resume_wakeups(anchor); 1760 usb_anchor_resume_wakeups(anchor);
1774 atomic_dec(&urb->use_count); 1761 atomic_dec(&urb->use_count);