linux/arch
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
..
alpha cpumask: make irq_set_affinity() take a const struct cpumask 2008-12-13 21:20:26 +10:30
arm Merge branch 'linus' into cpus4096 2008-12-17 13:07:48 +01:00
avr32 cpumask: convert struct clock_event_device to cpumask pointers. 2008-12-13 21:20:26 +10:30
blackfin cpumask: convert struct clock_event_device to cpumask pointers. 2008-12-13 21:20:26 +10:30
cris cpumask: make irq_set_affinity() take a const struct cpumask 2008-12-13 21:20:26 +10:30
frv frv: fix mmap2 error handling 2008-12-01 19:55:24 -08:00
h8300 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-23 08:20:34 -07:00
ia64 Merge branch 'linus' into cpus4096 2008-12-17 13:07:48 +01:00
m32r Merge ../linux-2.6-x86 2008-12-13 21:55:51 +10:30
m68k m68k: Update defconfigs for 2.6.28-rc7 2008-12-02 20:58:26 +01:00
m68knommu cpumask: convert struct clock_event_device to cpumask pointers. 2008-12-13 21:20:26 +10:30
mips Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-ingo into cpus4096 2008-12-16 12:24:38 +01:00
mn10300 MN10300: Give correct size when reserving interrupt vector table 2008-12-10 13:34:33 -08:00
parisc cpumask: make irq_set_affinity() take a const struct cpumask 2008-12-13 21:20:26 +10:30
powerpc Merge branch 'linus' into cpus4096 2008-12-18 11:48:30 +01:00
s390 Merge ../linux-2.6-x86 2008-12-13 21:55:51 +10:30
sh Merge branch 'linus' into cpus4096 2008-12-17 13:07:48 +01:00
sparc cpumask: centralize cpu_online_map and cpu_possible_map 2008-12-13 21:19:41 +10:30
sparc64 cpumask: convert struct clock_event_device to cpumask pointers. 2008-12-13 21:20:26 +10:30
um Merge ../linux-2.6-x86 2008-12-13 21:55:51 +10:30
x86 x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6 2008-10-23 09:16:56 -07:00
.gitignore
Kconfig remove __ARCH_WANT_COMPAT_SYS_PTRACE 2008-11-30 11:00:15 -08:00