Skip to content

Commit

Permalink
Merge tag 'nfs-for-3.11-5' of git://git.linux-nfs.org/projects/trondm…
Browse files Browse the repository at this point in the history
…y/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
  • Loading branch information
torvalds committed Aug 30, 2013
2 parents c95389b + 347e223 commit 06a557f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/sunrpc/xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06a557f

Please sign in to comment.