Skip to content

Commit 58ba4fc

Browse files
committed
NFSD: fix decoding in nfs4_xdr_dec_cb_getattr
JIRA: https://issues.redhat.com/browse/RHEL-108616 commit 1b3e26a Author: Olga Kornievskaia <okorniev@redhat.com> Date: Thu Dec 19 15:12:04 2024 -0500 NFSD: fix decoding in nfs4_xdr_dec_cb_getattr If a client were to send an error to a CB_GETATTR call, the code erronously continues to try decode past the error code. It ends up returning BAD_XDR error to the rpc layer and then in turn trigger a WARN_ONCE in nfsd4_cb_done() function. Fixes: 6487a13 ("NFSD: add support for CB_GETATTR callback") Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
1 parent 5e46582 commit 58ba4fc

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 (status)
608+
if (unlikely(status || cb->cb_seq_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)