Skip to content

Commit

Permalink
genirq: Warn when handler enables interrupts
Browse files Browse the repository at this point in the history
We run all handlers with interrupts disabled and expect them not to
enable them. Warn when we catch one who does.

Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Feb 19, 2011
1 parent 1082687 commit b738a50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
ret = action->handler(irq, action->dev_id);
trace_irq_handler_exit(irq, action, ret);

if (WARN_ON_ONCE(!irqs_disabled()))
local_irq_disable();

switch (ret) {
case IRQ_WAKE_THREAD:
/*
Expand Down Expand Up @@ -114,7 +117,6 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)

if (status & IRQF_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
local_irq_disable();

return retval;
}

0 comments on commit b738a50

Please sign in to comment.