1
linux/arch/arm/mm
Peter Zijlstra 20273941f2 mm: fix race in kunmap_atomic()
Christoph reported a nice splat which illustrated a race in the new stack
based kmap_atomic implementation.

The problem is that we pop our stack slot before we're completely done
resetting its state -- in particular clearing the PTE (sometimes that's
CONFIG_DEBUG_HIGHMEM).  If an interrupt happens before we actually clear
the PTE used for the last slot, that interrupt can reuse the slot in a
dirty state, which triggers a BUG in kmap_atomic().

Fix this by introducing kmap_atomic_idx() which reports the current slot
index without actually releasing it and use that to find the PTE and delay
the _pop() until after we're completely done.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reported-by: Christoph Hellwig <hch@infradead.org>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:05 -07:00
..
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S
abort-ev7.S
abort-lv4t.S
abort-macro.S
abort-nommu.S
alignment.c ARM: 6401/1: plug a race in the alignment trap handler 2010-09-23 15:17:04 +01:00
cache-fa.S
cache-feroceon-l2.c
cache-l2x0.c
cache-tauros2.c
cache-v3.S
cache-v4.S
cache-v4wb.S
cache-v4wt.S
cache-v6.S ARM: 6405/1: Handle __flush_icache_all for CONFIG_SMP_ON_UP 2010-10-04 20:23:36 +01:00
cache-v7.S ARM: 6405/1: Handle __flush_icache_all for CONFIG_SMP_ON_UP 2010-10-04 20:23:36 +01:00
cache-xsc3l2.c
context.c
copypage-fa.c
copypage-feroceon.c
copypage-v3.c
copypage-v4mc.c ARM: 6379/1: Assume new page cache pages have dirty D-cache 2010-09-19 12:17:43 +01:00
copypage-v4wb.c
copypage-v4wt.c
copypage-v6.c ARM: 6379/1: Assume new page cache pages have dirty D-cache 2010-09-19 12:17:43 +01:00
copypage-xsc3.c
copypage-xscale.c ARM: 6379/1: Assume new page cache pages have dirty D-cache 2010-09-19 12:17:43 +01:00
dma-mapping.c ARM: 6379/1: Assume new page cache pages have dirty D-cache 2010-09-19 12:17:43 +01:00
extable.c
fault-armv.c mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
fault.c
fault.h
flush.c ARM: 6386/1: flush_ptrace_access: invalidate correct I-cache alias 2010-10-04 20:57:10 +01:00
highmem.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
init.c Merge branch 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 18:52:11 -07:00
iomap.c
ioremap.c ARM: relax ioremap prohibition (309caa9) for -final and -stable 2010-10-13 00:19:03 +01:00
Kconfig
Makefile
mm.h
mmap.c ARM: implement CONFIG_STRICT_DEVMEM by disabling access to RAM via /dev/mem 2010-10-01 22:31:34 -04:00
mmu.c Merge branch 'devel-stable' into devel 2010-10-19 22:06:36 +01:00
nommu.c
pabort-legacy.S
pabort-v6.S
pabort-v7.S
pgd.c mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
proc-arm6_7.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm7tdmi.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm9tdmi.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm720.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm740.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm920.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm922.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm925.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm926.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm940.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm946.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm1020.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm1020e.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm1022.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-arm1026.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-fa526.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-feroceon.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-macros.S
proc-mohawk.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-sa110.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-sa1100.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-syms.c
proc-v6.S Merge branch 'hotplug' into devel 2010-10-18 22:34:47 +01:00
proc-v7.S Merge branch 'devel-stable' into devel 2010-10-19 22:06:36 +01:00
proc-xsc3.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
proc-xscale.S ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type 2010-10-08 10:07:32 +01:00
tlb-fa.S
tlb-v3.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S
tlb-v7.S ARM: Allow SMP kernels to boot on UP systems 2010-10-04 20:23:36 +01:00
vmregion.c
vmregion.h