https://github.com/torvalds/linux
Revision 347e2233b7667e336d9f671f1a52dfa3f0416e2c authored by Trond Myklebust on 28 August 2013, 17:35:13 UTC, committed by Trond Myklebust on 28 August 2013, 19:43:43 UTC
Some architectures, such as ARM-32 do not return the same base address
when you call kmap_atomic() twice on the same page.
This causes problems for the memmove() call in the XDR helper routine
"_shift_data_right_pages()", since it defeats the detection of
overlapping memory ranges, and has been seen to corrupt memory.

The fix is to distinguish between the case where we're doing an
inter-page copy or not. In the former case of we know that the memory
ranges cannot possibly overlap, so we can additionally micro-optimise
by replacing memmove() with memcpy().

Reported-by: Mark Young <MYoung@nvidia.com>
Reported-by: Matt Craighead <mcraighead@nvidia.com>
Cc: Bruce Fields <bfields@fieldses.org>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Matt Craighead <mcraighead@nvidia.com>
1 parent fa8218d
History
Tip revision: 347e2233b7667e336d9f671f1a52dfa3f0416e2c authored by Trond Myklebust on 28 August 2013, 17:35:13 UTC
SUNRPC: Fix memory corruption issue on 32-bit highmem systems
Tip revision: 347e223
File Mode Size
Kconfig -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 257 bytes
emif.c -rw-r--r-- 54.7 KB
emif.h -rw-r--r-- 19.1 KB
mvebu-devbus.c -rw-r--r-- 8.3 KB
of_memory.c -rw-r--r-- 4.8 KB
of_memory.h -rw-r--r-- 1.1 KB
tegra20-mc.c -rw-r--r-- 5.9 KB
tegra30-mc.c -rw-r--r-- 9.0 KB

back to top