From: Andrew Morton Date: Wed, 22 Aug 2007 21:01:20 +0000 (-0700) Subject: free_irq(): fix DEBUG_SHIRQ handling X-Git-Tag: v2.6.23-rc4~78 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b7f07155f8ee1536da2f9590f1aa9383afefb6b;p=linux-2.6 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 Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 203a518b6f..853aefbd18 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -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 }