Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

free_irq(): fix DEBUG_SHIRQ handling

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 <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
8b7f0715 436bbd43

+2
+2
kernel/irq/manage.c
··· 462 462 * We do this after actually deregistering it, to make sure that 463 463 * a 'real' IRQ doesn't run in parallel with our fake 464 464 */ 465 + local_irq_save(flags); 465 466 handler(irq, dev_id); 467 + local_irq_restore(flags); 466 468 } 467 469 #endif 468 470 }