NFSD: fix decoding in nfs4_xdr_dec_cb_getattr
authorOlga Kornievskaia <okorniev@redhat.com>
Thu, 19 Dec 2024 20:12:04 +0000 (15:12 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 6 Jan 2025 14:37:39 +0000 (09:37 -0500)
commit1b3e26a5ccbfc2f85bda1930cc278e313165e353
tree5000feb02dd4eb41601cc64d7129e47a1d56aeac
parent35e34642b5996df91e2879d59f726df6072c82f9
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: 6487a13b5c6b ("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>
fs/nfsd/nfs4callback.c