Merge tag 'nfs-for-3.11-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfix from Trond Myklebust: "Stable patch to fix a highmem-related data corruption issue on 32-bit ARM platforms" * tag 'nfs-for-3.11-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: Fix memory corruption issue on 32-bit highmem systems
This commit is contained in:
@@ -207,10 +207,13 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
|
||||
pgfrom_base -= copy;
|
||||
|
||||
vto = kmap_atomic(*pgto);
|
||||
vfrom = kmap_atomic(*pgfrom);
|
||||
memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
|
||||
if (*pgto != *pgfrom) {
|
||||
vfrom = kmap_atomic(*pgfrom);
|
||||
memcpy(vto + pgto_base, vfrom + pgfrom_base, copy);
|
||||
kunmap_atomic(vfrom);
|
||||
} else
|
||||
memmove(vto + pgto_base, vto + pgfrom_base, copy);
|
||||
flush_dcache_page(*pgto);
|
||||
kunmap_atomic(vfrom);
|
||||
kunmap_atomic(vto);
|
||||
|
||||
} while ((len -= copy) != 0);
|
||||
|
Reference in New Issue
Block a user