alistair23-linux/arch/mips
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
..
alchemy Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-10-25 08:32:05 -07:00
ar7 MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
bcm47xx MIPS: BCM47xx: Fix nvram_getenv return value. 2010-08-05 13:26:31 +01:00
bcm63xx MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
boot Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2010-10-18 13:10:36 -07:00
cavium-octeon MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cobalt MIPS: Move Cobalt Makefile parts to their own Platform file 2010-08-05 13:25:47 +01:00
configs defconfig reduction 2010-08-14 22:26:53 +02:00
dec Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-irqflags 2010-10-21 14:37:27 -07:00
emma MIPS: Ritually kill stupid printk. 2010-08-05 13:26:27 +01:00
fw MIPS: IP22: Remove an unused function 2009-12-17 01:56:56 +00:00
include/asm mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
jazz MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
jz4740 MIPS: jz4740: Fix Kbuild Platform file. 2010-10-19 18:32:39 +01:00
kernel Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-10-25 08:19:14 -07:00
lasat MIPS: Lasat: Migrate to new platform makefile style. 2010-08-05 13:25:53 +01:00
lib MIPS: libgcc.h: Checkpatch cleanup 2010-04-12 17:26:15 +01:00
loongson MIPS: Loongson: Remove unused macro LOONGSON_PERFCNT_IRQ 2010-08-05 13:26:26 +01:00
math-emu Update broken web addresses in arch directory. 2010-10-18 11:03:21 +02:00
mipssim MIPS: MIPSsim: Migrate to new Platform file 2010-08-05 13:25:45 +01:00
mm mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
mti-malta MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
nxp/pnx8550/common MIPS: PNX8550: Move code one directory level up. 2010-08-05 13:25:56 +01:00
oprofile MIPS: Oprofile: Fixup of loongson2_exit() 2010-07-05 17:17:31 +01:00
pci Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
pmc-sierra MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
pnx833x MIPS: Fix gen_nand probe structures contents 2010-08-12 12:22:49 +01:00
pnx8550 MIPS: PNX8550: Sort out machine halt, restart and powerdown functions. 2010-10-04 18:33:57 +01:00
power MIPS: Loongson: Change the Email address of Wu Zhangjin 2010-02-27 12:53:12 +01:00
powertv MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
rb532 MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
sgi-ip22 MIPS: IP22, IP28: Migrate to new platform makefile style. 2010-08-05 13:25:49 +01:00
sgi-ip27 MIPS: IP27: Migrate to new Platform file 2010-08-05 13:25:47 +01:00
sgi-ip32 MIPS: IP32: Migrate to new platform makefile style. 2010-08-05 13:25:50 +01:00
sibyte Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
sni MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
txx9 MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
vr41xx MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
wrppmc MIPS: WRPPMC: Migrate to new platform makefile style. 2010-08-05 13:25:51 +01:00
Kbuild MIPS: Repair Kbuild make clean breakage. 2010-10-19 18:32:39 +01:00
Kbuild.platforms MIPS: JZ4740: Add Kbuild files 2010-08-05 13:26:17 +01:00
Kconfig Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-10-25 08:19:14 -07:00
Kconfig.debug MIPS: Crazy spinlock speed test. 2010-02-27 12:53:42 +01:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-08-05 14:10:07 -07:00