2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00
linux-next/arch/x86
Mike Travis a775a38b13 x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
Impact: fix potential APIC crash

In determining the destination apicid, there are usually three cpumasks
that are considered: the incoming cpumask arg, cfg->domain and the
cpu_online_mask.  Since we are just introducing the cpu_mask_to_apicid_and
function, make sure it includes the cpu_online_mask in it's evaluation.
[Added with this patch.]

There are two io_apic.c functions that did not previously use the
cpu_online_mask:  setup_IO_APIC_irq and msi_compose_msg.  Both of these
simply used cpu_mask_to_apicid(cfg->domain & TARGET_CPUS), and all but
one arch (NUMAQ[*]) returns only online cpus in the TARGET_CPUS mask,
so the behavior is identical for all cases.

[*: NUMAQ bug?]

Note that alloc_cpumask_var is only used for the 32-bit cases where
it's highly likely that the cpumask set size will be small and therefore
CPUMASK_OFFSTACK=n.  But if that's not the case, failing the allocate
will cause the same return value as the default.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-18 11:59:24 +01:00
..
boot x86: use limited register constraint for setnz 2008-11-25 15:38:03 +01:00
configs x86: remove irqbalance in kernel for 32 bit 2008-10-16 16:52:52 +02:00
crypto crypto: crc32c - Use Intel CRC32 instruction 2008-08-29 15:49:50 +10:00
ia32 compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
include/asm x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
kernel x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
kvm KVM: MMU: avoid creation of unreachable pages in the shadow 2008-11-26 12:34:27 +02:00
lguest cpumask: convert struct clock_event_device to cpumask pointers. 2008-12-13 21:20:26 +10:30
lib Merge commit 'v2.6.28-rc2' into core/locking 2008-10-28 16:54:49 +01:00
mach-default Merge branches 'x86/prototypes', 'x86/x2apic' and 'x86/debug' into x86/core 2008-08-14 14:58:22 +02:00
mach-generic x86 smp: modify send_IPI_mask interface to accept cpumask_t pointers 2008-12-16 17:40:56 -08:00
mach-rdc321x removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
mach-voyager x86: prepare for cpumask iterators to only go to nr_cpu_ids 2008-12-16 17:40:58 -08:00
math-emu x86: coding style fixes to arch/x86/math-emu/reg_constant 2008-06-18 15:00:13 +02:00
mm x86: prepare for cpumask iterators to only go to nr_cpu_ids 2008-12-16 17:40:58 -08:00
oprofile x86/oprofile: fix Intel cpu family 6 detection 2008-12-03 17:17:17 +01:00
pci Merge branches 'irq/sparseirq', 'x86/quirks' and 'x86/reboot' into cpus4096 2008-12-12 13:49:24 +01:00
power x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set 2008-11-12 23:28:51 +01:00
vdso trace: rename unlikely profiler to branch profiler 2008-11-12 22:27:58 +01:00
video x86: video/fbdev.c: add MODULE_LICENSE 2008-05-04 20:04:46 +02:00
xen x86: xen: use smp_call_function_many() 2008-12-16 17:40:59 -08:00
Kconfig Merge branch 'irq/sparseirq' into cpus4096 2008-12-17 13:16:08 +01:00
Kconfig.cpu x86, bts, ftrace: a BTS ftrace plug-in prototype 2008-11-25 17:31:13 +01:00
Kconfig.debug trace: add the MMIO-tracer to the tracer menu, cleanup 2008-10-27 14:07:26 +01:00
Makefile x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
Makefile_32.cpu x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00