Commit 3c26caa7 authored by Thomas Gleixner's avatar Thomas Gleixner

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: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarMichael Buesch <mb@bu3sch.de>
parent 2d860ad7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment