linux/arch/x86/mm
Linus Torvalds b04e6373d6 x86: don't call '->send_IPI_mask()' with an empty mask
As noted in 83d349f35e ("x86: don't send
an IPI to the empty set of CPU's"), some APIC's will be very unhappy
with an empty destination mask.  That commit added a WARN_ON() for that
case, and avoided the resulting problem, but didn't fix the underlying
reason for why those empty mask cases happened.

This fixes that, by checking the result of 'cpumask_andnot()' of the
current CPU actually has any other CPU's left in the set of CPU's to be
sent a TLB flush, and not calling down to the IPI code if the mask is
empty.

The reason this started happening at all is that we started passing just
the CPU mask pointers around in commit 4595f9620 ("x86: change
flush_tlb_others to take a const struct cpumask"), and when we did that,
the cpumask was no longer thread-local.

Before that commit, flush_tlb_mm() used to create it's own copy of
'mm->cpu_vm_mask' and pass that copy down to the low-level flush
routines after having tested that it was not empty.  But after changing
it to just pass down the CPU mask pointer, the lower level TLB flush
routines would now get a pointer to that 'mm->cpu_vm_mask', and that
could still change - and become empty - after the test due to other
CPU's having flushed their own TLB's.

See

	http://bugzilla.kernel.org/show_bug.cgi?id=13933

for details.

Tested-by: Thomas Björnell <thomas.bjornell@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-08-21 09:48:10 -07:00
..
kmemcheck kmemcheck: add opcode self-testing at boot 2009-06-15 15:49:22 +02:00
dump_pagetables.c
extable.c
fault.c x86: Remove spurious printk level from segfault message 2009-07-11 09:56:19 +02:00
gup.c Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-20 11:29:32 -07:00
highmem_32.c x86: Export kmap_atomic_prot() needed for TTM. 2009-07-29 15:56:22 +10:00
hugetlbpage.c x86: ignore VM_LOCKED when determining if hugetlb-backed page tables can be shared or not 2009-05-29 08:40:03 -07:00
init_32.c Merge commit 'linus/master' into HEAD 2009-06-15 15:50:49 +02:00
init_64.c x86: don't clear nodes_states[N_NORMAL_MEMORY] when numa is not compiled in 2009-07-08 10:32:50 -07:00
init.c x86: Declare check_efer() before it gets used 2009-07-01 16:52:54 +02:00
iomap_32.c
ioremap.c
k8topology_64.c
kmmio.c
Makefile kmemcheck: add the kmemcheck core 2009-06-13 15:37:30 +02:00
memtest.c x86: memtest: use pointers of equal type for comparison 2009-06-11 16:26:35 +02:00
mmap.c
mmio-mod.c
numa_32.c
numa_64.c x86, mm: Fix node_possible_map logic 2009-05-18 09:21:04 +02:00
numa.c
pageattr-test.c
pageattr.c x86: Fix CPA memtype reserving in the set_pages_array*() cases 2009-08-03 19:36:09 +02:00
pat.c
pf_in.c
pf_in.h
pgtable_32.c
pgtable.c x86, 32-bit: Fix double accounting in reserve_top_address() 2009-08-04 16:27:29 +02:00
srat_32.c
srat_64.c x86-64: Fix bad_srat() to clear all state 2009-07-21 15:20:01 -07:00
testmmiotrace.c
tlb.c x86: don't call '->send_IPI_mask()' with an empty mask 2009-08-21 09:48:10 -07:00