Commit 06a557f7 authored by Linus Torvalds's avatar Linus Torvalds

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
parents c95389b4 347e2233
...@@ -207,10 +207,13 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, ...@@ -207,10 +207,13 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
pgfrom_base -= copy; pgfrom_base -= copy;
vto = kmap_atomic(*pgto); vto = kmap_atomic(*pgto);
vfrom = kmap_atomic(*pgfrom); if (*pgto != *pgfrom) {
memmove(vto + pgto_base, vfrom + pgfrom_base, copy); 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); flush_dcache_page(*pgto);
kunmap_atomic(vfrom);
kunmap_atomic(vto); kunmap_atomic(vto);
} while ((len -= copy) != 0); } while ((len -= copy) != 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment