[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0908132100210.1283@localhost.localdomain>
Date: Thu, 13 Aug 2009 21:02:22 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: [GIT pull] genirq fixes for 2.6.31
Linus,
Please pull the latest irq-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git irq-fixes-for-linus
Thanks,
tglx
------------------>
Thomas Gleixner (1):
genirq: Prevent race between free_irq() and handle_IRQ_event()
kernel/irq/handle.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 065205b..4e7f17a 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -403,8 +403,16 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
*/
if (likely(!test_bit(IRQTF_DIED,
&action->thread_flags))) {
+ struct task_struct *tsk = action->thread;
+
set_bit(IRQTF_RUNTHREAD, &action->thread_flags);
- wake_up_process(action->thread);
+ /*
+ * Check tsk as we might race against
+ * free_irq which sets action->thread
+ * to NULL
+ */
+ if (tsk)
+ wake_up_process(tsk);
}
/* Fall through to add to randomness */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists