linux/kernel/irq
Linus Torvalds 2d860ad76f 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 <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-08-13 23:09:27 +02:00
..
Makefile x86/irq: use move_irq_desc() in create_irq_nr() 2009-05-01 19:01:12 +02:00
autoprobe.c async: Asynchronous function calls to speed up kernel boot 2009-01-07 08:45:46 -08:00
chip.c x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC 2009-04-28 12:21:15 +02:00
devres.c genirq: add support for threaded interrupts to devres 2009-03-24 12:15:23 +01:00
handle.c irq: slab alloc for default irq_affinity 2009-06-12 13:50:23 +03:00
internals.h genirq: Delegate irq affinity setting to the irq thread 2009-07-21 14:35:07 +02:00
manage.c genirq: prevent wakeup of freed irq thread 2009-08-13 23:09:27 +02:00
migration.c genirq: Delegate irq affinity setting to the irq thread 2009-07-21 14:35:07 +02:00
numa_migrate.c x86/irq: Fix move_irq_desc() for nodes without ram 2009-08-08 17:06:03 +02:00
pm.c PM: Introduce functions for suspending and resuming device interrupts 2009-03-30 21:46:54 +02:00
proc.c cpumask: update irq_desc to use cpumask_var_t 2009-01-11 19:12:46 +01:00
resend.c generic: sparse irqs: use irq_desc() together with dyn_array, instead of irq_desc[] 2008-10-16 16:52:29 +02:00
spurious.c irq: provide debug_poll_all_shared_irqs() method under CONFIG_DEBUG_SHIRQ 2009-01-16 17:46:49 +01:00