summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2014-12-07 16:05:48 -0500
committerJ. Bruce Fields <bfields@redhat.com>2014-12-09 15:52:17 -0500
commitbf7491f1be5e125eece2ec67e0f79d513caa6c7e (patch)
tree10931e5d07399bc9f0ce0bcc7602c852de32457a /fs/nfsd
parent5a64e56976f1ba98743e1678c0029a98e9034c81 (diff)
downloadop-kernel-dev-bf7491f1be5e125eece2ec67e0f79d513caa6c7e.zip
op-kernel-dev-bf7491f1be5e125eece2ec67e0f79d513caa6c7e.tar.gz
nfsd4: fix xdr4 count of server in fs_location4
Fix a bug where nfsd4_encode_components_esc() incorrectly calculates the length of server array in fs_location4--note that it is a count of the number of array elements, not a length in bytes. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Fixes: 082d4bd72a45 (nfsd4: "backfill" using write_bytes_to_xdr_buf) Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index a8549f8..e578c87 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1817,7 +1817,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
str = end;
}
- pathlen = htonl(xdr->buf->len - pathlen_offset);
+ pathlen = htonl(count);
write_bytes_to_xdr_buf(xdr->buf, pathlen_offset, &pathlen, 4);
return 0;
}
OpenPOWER on IntegriCloud