Skip to content

Commit bee3364

Browse files
committed
NFSD: Fix CB_GETATTR status fix
JIRA: https://issues.redhat.com/browse/RHEL-108616 commit 4990d09 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Feb 10 11:43:31 2025 -0500 NFSD: Fix CB_GETATTR status fix Jeff says: Now that I look, 1b3e26a 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: 1b3e26a ("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> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
1 parent 58ba4fc commit bee3364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ static int nfs4_xdr_dec_cb_getattr(struct rpc_rqst *rqstp,
605605
return status;
606606

607607
status = decode_cb_op_status(xdr, OP_CB_GETATTR, &cb->cb_status);
608-
if (unlikely(status || cb->cb_seq_status))
608+
if (unlikely(status || cb->cb_status))
609609
return status;
610610
if (xdr_stream_decode_uint32_array(xdr, bitmap, 3) < 0)
611611
return -NFSERR_BAD_XDR;

0 commit comments

Comments
 (0)