Skip to content

Commit

Permalink
genirq: assert that irq handlers are indeed running in hardirq context
Browse files Browse the repository at this point in the history
Make sure the genirq layer handlers are indeed running handlers
in hardirq context. That is the genirq expectation and doing
anything else is broken.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <1236006812.5330.632.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 2, 2009
1 parent c02368a commit 044d408
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0;

WARN_ONCE(!in_irq(), "BUG: IRQ handler called from non-hardirq context!");

if (!(action->flags & IRQF_DISABLED))
local_irq_enable_in_hardirq();

Expand Down

0 comments on commit 044d408

Please sign in to comment.