]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 6165/1: trap overflows on highmem pages from kmap_atomic when debugging
authorNicolas Pitre <nico@fluxnic.net>
Mon, 7 Jun 2010 20:28:55 +0000 (21:28 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 8 Jun 2010 18:25:50 +0000 (19:25 +0100)
commit07993579f8dd24b1f27b6f0da62b205f5af22535
treeaef818d66f5dbe04817b88b8d0351035740118ba
parentc100309b3d39d16a0289e21697d89a902f08a917
ARM: 6165/1: trap overflows on highmem pages from kmap_atomic when debugging

When CONFIG_DEBUG_HIGHMEM is used, the fixmap entry used for a highmem page
by kmap_atomic() is always cleared by kunmap_atomic().  This helps find
bad usages such as dereferences after the unmap, or overflow into the
adjacent fixmap areas.

But this debugging aid is completely bypassed when a kmap for the same
page already exists as the kmap is reused instead.  ON VIVT systems we
have no choice but to reuse that kmap due to cache coherency issues,
but on non VIVT systems we should always force the fixmap usage when
debugging is active.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/highmem.c