projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11487dd
)
nfs/blocklayout: Make sure calculate signature length aligned
author
Kinglong Mee
<kinglongmee@gmail.com>
Thu, 14 Jul 2016 04:01:28 +0000
(12:01 +0800)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Fri, 15 Jul 2016 19:51:11 +0000
(15:51 -0400)
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>
fs/nfs/blocklayout/dev.c
patch
|
blob
|
history
diff --git
a/fs/nfs/blocklayout/dev.c
b/fs/nfs/blocklayout/dev.c
index
436bb30
..
7d9f570
100644
(file)
--- 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: