diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2025-02-10 11:43:31 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-02-10 13:31:28 -0500 |
commit | 4990d098433db18c854e75fb0f90d941eb7d479e (patch) | |
tree | cfe845fcd57b8e91e86cdd9a460f5c7009a00ba9 | |
parent | 036ac2778f7b28885814c6fbc07e156ad1624d03 (diff) | |
download | linux-4990d098433db18c854e75fb0f90d941eb7d479e.tar.gz linux-4990d098433db18c854e75fb0f90d941eb7d479e.tar.bz2 linux-4990d098433db18c854e75fb0f90d941eb7d479e.zip |
NFSD: Fix CB_GETATTR status fix
Jeff says:
Now that I look, 1b3e26a5ccbf is wrong. The patch on the ml was correct, but
the one that got committed is different. It should be:
status = decode_cb_op_status(xdr, OP_CB_GETATTR, &cb->cb_status);
if (unlikely(status || cb->cb_status))
If "status" is non-zero, decoding failed (usu. BADXDR), but we also want to
bail out and not decode the rest of the call if the decoded cb_status is
non-zero. That's not happening here, cb_seq_status has already been checked and
is non-zero, so this ends up trying to decode the rest of the CB_GETATTR reply
when it doesn't exist.
Reported-by: Jeff Layton <jlayton@kernel.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219737
Fixes: 1b3e26a5ccbf ("NFSD: fix decoding in nfs4_xdr_dec_cb_getattr")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r-- | fs/nfsd/nfs4callback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index cf6d29828f4e..484077200c5d 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -679,7 +679,7 @@ static int nfs4_xdr_dec_cb_getattr(struct rpc_rqst *rqstp, return status; status = decode_cb_op_status(xdr, OP_CB_GETATTR, &cb->cb_status); - if (unlikely(status || cb->cb_seq_status)) + if (unlikely(status || cb->cb_status)) return status; if (xdr_stream_decode_uint32_array(xdr, bitmap, 3) < 0) return -NFSERR_BAD_XDR; |