diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-17 14:07:16 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-17 14:14:13 +0200 |
commit | 3c26caa7409ad5367b257de3d7943551d4a959ee (patch) | |
tree | edb5f042f58f54e9a963244bb07afde914483db5 /kernel | |
parent | 2d860ad76f4ee4d2eba0fe3797c8d7cdce432cc0 (diff) | |
download | lwn-3c26caa7409ad5367b257de3d7943551d4a959ee.tar.gz lwn-3c26caa7409ad5367b257de3d7943551d4a959ee.zip |
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@bu3sch.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | 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 d222515a5a06..76fa62fb9e47 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); |