projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3a3a9c
)
NFSv4: Fix brainfart in attribute length calculation
author
Trond Myklebust
<
[email protected]
>
Tue, 23 Jul 2013 16:53:39 +0000
(12:53 -0400)
committer
Linus Torvalds
<
[email protected]
>
Tue, 23 Jul 2013 21:24:59 +0000
(14:24 -0700)
The calculation of the attribute length was 4 bytes off.
Signed-off-by: Trond Myklebust <
[email protected]
>
Tested-by: Andre Heider <
[email protected]
>
Reported-and-tested-by: Henrik Rydberg <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/nfs/nfs4xdr.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4xdr.c
b/fs/nfs/nfs4xdr.c
index c74d6168db99b917ad202c874a9f161f29e920e5..3850b018815f2d07e4740fdd3ff8200523b9fe92 100644
(file)
--- a/
fs/nfs/nfs4xdr.c
+++ b/
fs/nfs/nfs4xdr.c
@@
-1118,11
+1118,11
@@
static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap,
len, ((char *)p - (char *)q) + 4);
BUG();
}
- len = (char *)p - (char *)q - (bmval_len << 2);
*q++ = htonl(bmval0);
*q++ = htonl(bmval1);
if (bmval_len == 3)
*q++ = htonl(bmval2);
+ len = (char *)p - (char *)(q + 1);
*q = htonl(len);
/* out: */