]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] update_mmu_cache: Don't cache-flush non-readable pages
authorScott Wood <scottwood@freescale.com>
Tue, 5 Feb 2008 19:43:26 +0000 (06:43 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 6 Feb 2008 05:30:01 +0000 (16:30 +1100)
commita616ab4776b5eaa70dce29806d5863b439346be6
treea7b6ef800cf9d32344fe3e6989eb17607e00fd3c
parent2d3c7ffe77475efd741a02dccf830aa15903ad49
[POWERPC] update_mmu_cache: Don't cache-flush non-readable pages

Currently, update_mmu_cache will crash if given a no-access PTE.
There's no need to synchronize dcache/icache unless it's an exec
mapping -- however, due to the existence of older glibc versions that
execute out of a read-but-no-exec page, readability is tested instead.

This assumes no exec-only mappings; if such mappings become supported,
they will need to go through the kmap_atomic() version of
dcache/icache synchronization.

This fixes a bug reported by some users where the kernel would crash
while dumping core on a threaded program.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/mem.c