Skip to content

Commit

Permalink
Merge branch 'for-3.17' of git://linux-nfs.org/~bfields/linux
Browse files Browse the repository at this point in the history
Pull nfsd bugfix from Bruce Fields:
 "This fixes a data corruption bug introduced by the v3.16 xdr encoding
  rewrite.  I haven't managed to reproduce it myself yet, but it's
  apparently not hard to hit given the right workload"

* 'for-3.17' of git://linux-nfs.org/~bfields/linux:
  nfsd4: fix corruption of NFSv4 read data
  • Loading branch information
Linus Torvalds committed Oct 1, 2014
2 parents aad7fb9 + 15b23ef commit a44f867
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3104,7 +3104,8 @@ static __be32 nfsd4_encode_splice_read(

buf->page_len = maxcount;
buf->len += maxcount;
xdr->page_ptr += (maxcount + PAGE_SIZE - 1) / PAGE_SIZE;
xdr->page_ptr += (buf->page_base + maxcount + PAGE_SIZE - 1)
/ PAGE_SIZE;

/* Use rest of head for padding and remaining ops: */
buf->tail[0].iov_base = xdr->p;
Expand Down

0 comments on commit a44f867

Please sign in to comment.