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-- 59.3 KB
Makefile -rw-r--r-- 1.1 KB
calibrate.c -rw-r--r-- 8.3 KB
do_mounts.c -rw-r--r-- 13.3 KB
do_mounts.h -rw-r--r-- 1.4 KB
do_mounts_initrd.c -rw-r--r-- 3.4 KB
do_mounts_md.c -rw-r--r-- 8.2 KB
do_mounts_rd.c -rw-r--r-- 8.4 KB
init_task.c -rw-r--r-- 728 bytes
initramfs.c -rw-r--r-- 13.0 KB
main.c -rw-r--r-- 21.9 KB
noinitramfs.c -rw-r--r-- 1.5 KB
version.c -rw-r--r-- 1.2 KB

back to top