linux/arch/x86/kernel/apic
Jan Kiszka ea7bdc65bc x86/apic: Plug racy xAPIC access of CPU hotplug code
apic_icr_write() and its users in smpboot.c were apparently
written under the assumption that this code would only run
during early boot. But nowadays we also execute it when onlining
a CPU later on while the system is fully running. That will make
wakeup_cpu_via_init_nmi and, thus, also native_apic_icr_write
run in plain process context. If we migrate the caller to a
different CPU at the wrong time or interrupt it and write to
ICR/ICR2 to send unrelated IPIs, we can end up sending INIT,
SIPI or NMIs to wrong CPUs.

Fix this by disabling interrupts during the write to the ICR
halves and disable preemption around waiting for ICR
availability and using it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-By: Igor Mammedov <imammedo@redhat.com>
Link: http://lkml.kernel.org/r/52E6AFFE.3030004@siemens.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 12:03:31 +01:00
..
apic_flat_64.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
apic_noop.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
apic_numachip.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
apic.c x86/apic: Plug racy xAPIC access of CPU hotplug code 2014-03-11 12:03:31 +01:00
bigsmp_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
es7000_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
hw_nmi.c x86: Fix trigger_all_cpu_backtrace() implementation 2013-06-20 14:00:21 +02:00
io_apic.c ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
ipi.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
Makefile trace,x86: Move creation of irq tracepoints from apic.c to irq.c 2013-06-21 10:33:28 -04:00
numaq_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
probe_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
probe_64.c x86/platform: Introduce APIC post-initialization callback 2012-06-06 09:06:19 +02:00
summit_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
x2apic_cluster.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
x2apic_phys.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
x2apic_uv_x.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00