android_kernel_xiaomi_sm8350/arch/mips/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
..
c-octeon.c MIPS: Give Octeon+ CPUs their own cputype. 2010-02-27 12:53:26 +01:00
c-r3k.c
c-r4k.c
c-tx39.c
cache.c MIPS: Fix __vmalloc() etc. on MIPS for non-GPL modules 2010-04-12 17:26:21 +01:00
cerr-sb1.c MIPS: Sibyte: Use hweight8 instead of counting bits 2009-12-17 01:57:16 +00:00
cex-gen.S
cex-oct.S
cex-sb1.S
dma-default.c MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask. 2010-10-04 18:33:56 +01:00
extable.c
fault.c MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
highmem.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
hugetlbpage.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
init.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ioremap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Makefile MIPS: Add -Werror to arch/mips/Kbuild 2010-08-05 13:25:44 +01:00
page.c MIPS: Move arch/mips/mm/uasm.h to arch/mips/include/asm/uasm.h 2010-02-27 12:53:19 +01:00
pgtable-32.c
pgtable-64.c MIPS: Two-level pagetables for 64-bit kernels with 64KB pages. 2010-02-27 12:53:03 +01:00
sc-ip22.c
sc-mips.c MIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines. 2009-09-30 21:47:00 +02:00
sc-r5k.c
sc-rm7k.c MIPS: RM7000: Symbol should be static 2010-10-04 18:33:54 +01:00
tlb-r3k.c
tlb-r4k.c MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
tlb-r8k.c
tlbex-fault.S
tlbex.c MIPS: JZ4740: Add base support for Ingenic JZ4740 System-on-a-Chip 2010-08-05 13:26:12 +01:00
uasm.c MIPS: uasm: Add option to export uasm API. 2010-08-05 13:26:21 +01:00