Skip to content

Commit

Permalink
free_irq(): fix DEBUG_SHIRQ handling
Browse files Browse the repository at this point in the history
If we're going to run the handler from free_irq() then we must do it with
local irq's disabled.  Otherwise lockdep complains that the handler is taking
irq-safe spinlocks in a non-irq-safe fashion.

Cc: Ingo Molnar <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and Linus Torvalds committed Aug 23, 2007
1 parent 436bbd4 commit 8b7f071
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ void free_irq(unsigned int irq, void *dev_id)
* We do this after actually deregistering it, to make sure that
* a 'real' IRQ doesn't run in parallel with our fake
*/
local_irq_save(flags);
handler(irq, dev_id);
local_irq_restore(flags);
}
#endif
}
Expand Down

0 comments on commit 8b7f071

Please sign in to comment.