blob: d9aa93d0ae59d5bba05dbee30a28f7b032758ee7 [file] [log] [blame]
From 8af7a6498641558c7321d39fec6271835f8986d9 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 22 Feb 2010 18:12:30 +0100
Subject: [PATCH] genirq: Fix stale oneshot flag.
commit ee2bdb55130653718b1b4fdb40d58ddb55bbe78c in tip.
The oneshot flag might be set when the thread starts and cleared later
in handle_edge_irq() - I know it's a hack :)
Check the flags in the irq thread code instead of using a possibly
stale value.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 1efad98..7d108d0 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -621,7 +621,7 @@ static int irq_thread(void *data)
struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO/2, };
struct irqaction *action = data;
struct irq_desc *desc = irq_to_desc(action->irq);
- int wake, oneshot = desc->status & IRQ_ONESHOT;
+ int wake;
sched_setscheduler(current, SCHED_FIFO, &param);
current->extra_flags |= PFE_HARDIRQ;
@@ -649,7 +649,7 @@ static int irq_thread(void *data)
action->thread_fn(action->irq, action->dev_id);
- if (oneshot)
+ if (desc->status & IRQ_ONESHOT)
irq_finalize_oneshot(action->irq, desc, action);
}
--
1.7.1.1