diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2016-07-14 12:01:28 +0800 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-15 15:51:11 -0400 |
commit | ecc2b88c4a48cbabb3ed7617f55e92c123fb634b (patch) | |
tree | b0ebecefe6cbb8a899fb60a87d06c1880dcf914b /fs/nfs/blocklayout | |
parent | 11487ddbdb12c36e094bedcc5c906ff219905a03 (diff) | |
download | linux-stable-ecc2b88c4a48cbabb3ed7617f55e92c123fb634b.tar.gz linux-stable-ecc2b88c4a48cbabb3ed7617f55e92c123fb634b.tar.bz2 linux-stable-ecc2b88c4a48cbabb3ed7617f55e92c123fb634b.zip |
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>
Diffstat (limited to 'fs/nfs/blocklayout')
-rw-r--r-- | fs/nfs/blocklayout/dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c index 436bb303d856..7d9f570e1b52 100644 --- a/fs/nfs/blocklayout/dev.c +++ b/fs/nfs/blocklayout/dev.c @@ -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: |