Commit-ID: 3c26caa7409ad5367b257de3d7943551d4a959ee Gitweb: http://git.kernel.org/tip/3c26caa7409ad5367b257de3d7943551d4a959ee Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx> AuthorDate: Mon, 17 Aug 2009 14:07:16 +0200 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Mon, 17 Aug 2009 14:14:13 +0200 genirq: Do not wakeup irq thread from __setup_irq() and set action->irq The wake_up_process() of the new irq thread in __setup_irq() is bogus. The irqaction is not yet set up completely, especially action->irq is not initialized. As a consequence the irq thread might dereference the wrong interrupt descriptor. Remove the wake up and set action->irq before the action is installed. The thread is woken up from the first interrupt. Reported-by: Michael Buesch <mb@xxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Tested-by: Michael Buesch <mb@xxxxxxxxx> --- kernel/irq/manage.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index d222515..76fa62f 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -607,7 +607,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) */ get_task_struct(t); new->thread = t; - wake_up_process(t); } /* @@ -690,6 +689,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) (int)(new->flags & IRQF_TRIGGER_MASK)); } + new->irq = irq; *old_ptr = new; /* Reset broken irq detection when installing new handler */ @@ -707,7 +707,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) spin_unlock_irqrestore(&desc->lock, flags); - new->irq = irq; register_irq_proc(irq, desc); new->dir = NULL; register_handler_proc(irq, new); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html