diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-01 16:22:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-01 16:22:00 -0400 |
commit | a44f867247d58b378dba0059c915a65ca8f93ba5 (patch) | |
tree | e1aaa82aa23a17f5a9eb5ccc87dd546acfc584bc | |
parent | aad7fb916a10f1065ad23de0c80a4a04bcba8437 (diff) | |
parent | 15b23ef5d348ea51c5e7573e2ef4116fbc7cb099 (diff) |
Merge branch 'for-3.17' of git://linux-nfs.org/~bfields/linux
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
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index e94457c33ad6..b01f6e100ee8 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -3104,7 +3104,8 @@ static __be32 nfsd4_encode_splice_read( | |||
3104 | 3104 | ||
3105 | buf->page_len = maxcount; | 3105 | buf->page_len = maxcount; |
3106 | buf->len += maxcount; | 3106 | buf->len += maxcount; |
3107 | xdr->page_ptr += (maxcount + PAGE_SIZE - 1) / PAGE_SIZE; | 3107 | xdr->page_ptr += (buf->page_base + maxcount + PAGE_SIZE - 1) |
3108 | / PAGE_SIZE; | ||
3108 | 3109 | ||
3109 | /* Use rest of head for padding and remaining ops: */ | 3110 | /* Use rest of head for padding and remaining ops: */ |
3110 | buf->tail[0].iov_base = xdr->p; | 3111 | buf->tail[0].iov_base = xdr->p; |