Skip to contentSkip to conversation

irq handle: use cached status instead of dereference NULL action

PATCH-rt26 Paul Gortmaker 1 participant 1 message Feb 20, 2009 IRQ

lore
Share & tools
lore
#0 lore raw

Patch "irq-tracer-fix.patch" from the additions at rt13 of the 26 preempt_rt patch set introduced a test on action->flags, but it comes at the end of a loop where we will have run all the chained handlers until action==NULL. Since we have stored the action->flags (or'd) in status while walking the action chain, use status in the check instead.

---
 kernel/irq/handle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/irq/handle.c +1 -1
index ed6deaa..314c9d7 100644
@@ -164,7 +164,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
 	} while (action);
 
 	if (status & IRQF_SAMPLE_RANDOM) {
-		if (hardirq_count() && (action->flags & IRQF_DISABLED))
+		if (hardirq_count() && (status & IRQF_DISABLED))
 			local_irq_enable();
 		add_interrupt_randomness(irq);
 	}
Signature · 1 line
1.6.0.4