mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
nfs/blocklayout: Make sure calculate signature length aligned
Avoid a bad nfs server return an unaligned length of signature. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
11487ddbdb
commit
ecc2b88c4a
1 changed files with 2 additions and 1 deletions
|
@ -89,7 +89,8 @@ nfs4_block_decode_volume(struct xdr_stream *xdr, struct pnfs_block_volume *b)
|
|||
memcpy(&b->simple.sigs[i].sig, p,
|
||||
b->simple.sigs[i].sig_len);
|
||||
|
||||
b->simple.len += 8 + 4 + b->simple.sigs[i].sig_len;
|
||||
b->simple.len += 8 + 4 + \
|
||||
(XDR_QUADLEN(b->simple.sigs[i].sig_len) << 2);
|
||||
}
|
||||
break;
|
||||
case PNFS_BLOCK_VOLUME_SLICE:
|
||||
|
|
Loading…
Reference in a new issue