mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
NFSv4.2: decode_read_plus_data() must skip padding after data segment
All XDR opaque object sizes are 32-bit aligned, and a data segment is no exception. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
1ee6310119
commit
5c4afe2ab6
@ -1038,7 +1038,9 @@ static int decode_read_plus_data(struct xdr_stream *xdr, struct nfs_pgio_res *re
|
||||
|
||||
p = xdr_decode_hyper(p, &offset);
|
||||
count = be32_to_cpup(p);
|
||||
recvd = xdr_align_data(xdr, res->count, count);
|
||||
recvd = xdr_align_data(xdr, res->count, xdr_align_size(count));
|
||||
if (recvd > count)
|
||||
recvd = count;
|
||||
res->count += recvd;
|
||||
|
||||
if (count > recvd) {
|
||||
|
Loading…
Reference in New Issue
Block a user