[PATCH 3/9] NFSD: Budget the CB_LAYOUTRECALL recall stateid
Chuck Lever <[email protected]> Sun, 02 Aug 2026 13:04:30 -0400
| Newsgroups | gmane.linux.nfs |
|---|---|
| Message-ID | <20260802-nfsd-deleg-destroy-badhandle-v1-3-323aa7196055@kernel.org> |
NFS4_enc_cb_layout_sz counts the opcode, the three scalar fields, the file handle, and the offset and length hypers. encode_cb_layout4args() also emits the layoutrecall4 discriminator and the recall stateid, so the macro falls five XDR words 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/xdr4cb.h b/fs/nfsd/xdr4cb.h index a7c8dc355d1a..5285934b3a54 100644 --- a/fs/nfsd/xdr4cb.h +++ b/fs/nfsd/xdr4cb.h @@ -27,8 +27,9 @@ op_dec_sz) #define NFS4_enc_cb_layout_sz (cb_compound_enc_hdr_sz + \ cb_sequence_enc_sz + \ - 1 + 3 + \ - enc_nfs4_fh_sz + 4) + op_enc_sz + 3 + 1 + \ + enc_nfs4_fh_sz + 4 + \ + enc_stateid_sz) #define NFS4_dec_cb_layout_sz (cb_compound_dec_hdr_sz + \ cb_sequence_dec_sz + \ op_dec_sz) -- 2.54.0