diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-22 09:21:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-22 09:21:02 -0700 |
commit | cf1d2c3e7e2f3754fe3d6dc747f7a092b168d9cf (patch) | |
tree | 7b645c020c195a1597f1836d16c0dd96225a9c83 /fs/lockd | |
parent | bee42512c4a0e6253d6b196445f9091438b264b5 (diff) | |
parent | 02579b2ff8b0becfb51d85a975908ac4ab15fba8 (diff) | |
download | linux-rt-cf1d2c3e7e2f3754fe3d6dc747f7a092b168d9cf.tar.gz |
Merge tag 'nfsd-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fixes from Chuck Lever:
"Critical bug fixes:
- Fix crash in NLM TEST procedure
- NFSv4.1+ backchannel not restored after PATH_DOWN"
* tag 'nfsd-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
nfsd: back channel stuck in SEQ4_STATUS_CB_PATH_DOWN
NLM: Fix svcxdr_encode_owner()
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/svcxdr.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/lockd/svcxdr.h b/fs/lockd/svcxdr.h index c69a0bb76c94..4f1a451da5ba 100644 --- a/fs/lockd/svcxdr.h +++ b/fs/lockd/svcxdr.h @@ -134,18 +134,9 @@ svcxdr_decode_owner(struct xdr_stream *xdr, struct xdr_netobj *obj) static inline bool svcxdr_encode_owner(struct xdr_stream *xdr, const struct xdr_netobj *obj) { - unsigned int quadlen = XDR_QUADLEN(obj->len); - __be32 *p; - - if (xdr_stream_encode_u32(xdr, obj->len) < 0) - return false; - p = xdr_reserve_space(xdr, obj->len); - if (!p) + if (obj->len > XDR_MAX_NETOBJ) return false; - p[quadlen - 1] = 0; /* XDR pad */ - memcpy(p, obj->data, obj->len); - - return true; + return xdr_stream_encode_opaque(xdr, obj->data, obj->len) > 0; } #endif /* _LOCKD_SVCXDR_H_ */ |