From: Linus Torvalds Date: Thu, 13 Aug 2009 20:05:10 +0000 (-0700) Subject: genirq: prevent wakeup of freed irq thread X-Git-Tag: v2.6.31-rc6~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d860ad76f4ee4d2eba0fe3797c8d7cdce432cc0;p=pandora-kernel.git genirq: prevent wakeup of freed irq thread free_irq() can remove an irqaction while the corresponding interrupt is in progress, but free_irq() sets action->thread to NULL unconditionally, which might lead to a NULL pointer dereference in handle_IRQ_event() when the hard interrupt context tries to wake up the handler thread. Prevent this by moving the thread stop after synchronize_irq(). No need to set action->thread to NULL either as action is going to be freed anyway. This fixes a boot crash reported against preempt-rt which uses the mainline irq threads code to implement full irq threading. [ tglx: removed local irqthread variable ] Signed-off-by: Linus Torvalds Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed