kernel-ark/arch/x86/kernel/apic
Tomoki Sekiyama f6175f5bfb x86/ioapic: Fix NULL pointer dereference on CPU hotplug after disabling irqs
In current Linux, percpu variable `vector_irq' is not cleared on
offlined cpus while disabling devices' irqs. If the cpu that has
the disabled irqs in vector_irq is hotplugged,
__setup_vector_irq() hits invalid irq vector and may crash.

This bug can be reproduced as following;

  # echo 0 > /sys/devices/system/cpu/cpu7/online
  # modprobe -r some_driver_using_interrupts      # vector_irq@cpu7 uncleared
  # echo 1 > /sys/devices/system/cpu/cpu7/online  # kernel may crash

This patch fixes this bug by clearing vector_irq in
__clear_irq_vector() even if the cpu is offlined.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: yrl.pp-manager.tt@hitachi.com
Cc: ltc-kernel@ml.yrl.intra.hitachi.co.jp
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Alexander Gordeev <agordeev@redhat.com>
Link: http://lkml.kernel.org/r/4FC340BE.7080101@hitachi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-06-06 12:03:25 +02:00
..
apic_flat_64.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
apic_noop.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
apic_numachip.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
apic.c Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-22 18:38:11 -07:00
bigsmp_32.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
es7000_32.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
hw_nmi.c x86, nmi: Wire up NMI handlers to new routines 2011-10-10 06:56:57 +02:00
io_apic.c x86/ioapic: Fix NULL pointer dereference on CPU hotplug after disabling irqs 2012-06-06 12:03:25 +02:00
ipi.c x86: Always use x86_cpu_to_logical_apicid for cpu -> logical apic id 2011-01-28 14:54:05 +01:00
Makefile x86: Add NumaChip support 2011-12-05 17:17:24 +01:00
numaq_32.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
probe_32.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
probe_64.c x86, apic: Make apic drivers static 2011-05-22 11:48:04 +02:00
summit_32.c x86/apic: Add apic->eoi_write() callback 2012-05-18 09:46:08 +02:00
x2apic_cluster.c x86/apic: Implement EIO micro-optimization 2012-05-18 09:46:09 +02:00
x2apic_phys.c x86/apic: Implement EIO micro-optimization 2012-05-18 09:46:09 +02:00
x2apic_uv_x.c x86/apic: Implement EIO micro-optimization 2012-05-18 09:46:09 +02:00