Skip to content

Commit ed194d1

Browse files
Sebastian Andrzej Siewiorgregkh
authored andcommitted
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 <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3f3ff6e commit ed194d1

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

drivers/usb/core/hcd.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,20 +1755,7 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
17551755

17561756
/* pass ownership to the completion handler */
17571757
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);
17701758
urb->complete(urb);
1771-
local_irq_restore(flags);
17721759

17731760
usb_anchor_resume_wakeups(anchor);
17741761
atomic_dec(&urb->use_count);

0 commit comments

Comments
 (0)