[PATCH 6/9] NFSD: Budget the CB_RECALL_ANY opcode

Chuck Lever <[email protected]> Sun, 02 Aug 2026 13:04:33 -0400
Newsgroups org.kernel.vger.linux-nfs
Message-ID <20260802-nfsd-deleg-destroy-badhandle-v1-6-323aa7196055@kernel.org>
NFS4_enc_cb_recall_any_sz counts the objects-to-keep field, the
bitmap array length, and the bitmap word. encode_cb_recallany4args()
emits an opcode ahead of all three, so the macro falls one XDR word
short.

This macro sizes p_arglen and nothing else. rq_callsize pads that
with two credential slacks, so the shortfall has never reached
the send buffer. No backport is needed.

Signed-off-by: Chuck Lever <[email protected]>
---
 fs/nfsd/xdr4cb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/xdr4cb.h b/fs/nfsd/xdr4cb.h
index 01bb54f03d25..838f8629821f 100644
--- a/fs/nfsd/xdr4cb.h
+++ b/fs/nfsd/xdr4cb.h
@@ -67,7 +67,7 @@
 					op_dec_sz)
 #define NFS4_enc_cb_recall_any_sz	(cb_compound_enc_hdr_sz +       \
 					cb_sequence_enc_sz +            \
-					1 + 1 + 1)
+					op_enc_sz + 1 + 1 + 1)
 #define NFS4_dec_cb_recall_any_sz	(cb_compound_dec_hdr_sz  +      \
 					cb_sequence_dec_sz +            \
 					op_dec_sz)

-- 
2.54.0