diff options
| author | Chuck Lever <cel@kernel.org> | 2026-08-17 20:57:15 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-04 21:15:29 -0400 |
| commit | ec013ca40bd78129cc32bd0dc92acc207821a7fb (patch) | |
| tree | 4a144cc9357f6c75cfd261accea27d368df04754 /scripts | |
| parent | 35ff1a7a7e3835c3e974bc5c45d335897564ceae (diff) | |
nfsd: set op->status when an operation's header cannot be encoded
nfsd4_encode_operation() leaves op->status alone when the reply
buffer has no room for the operation's opcode and status word.
nfsd4_proc_compound() reads the unchanged nfs_ok as success and
goes on to the next operation, so the reply counts an operation
whose result was never encoded.
Report the failure through nfsd4_check_resp_size(), which the rest
of the function already uses. It returns NFS4ERR_REP_TOO_BIG, or
NFS4ERR_REP_TOO_BIG_TO_CACHE on a session, and the COMPOUND ends
at that operation.
Two paths narrow the reply buffer: nfsd4_sequence(), which rejects
a SEQUENCE result that does not fit, and nfsd4_encode_splice_read(),
which can leave a single XDR word in the head page. Whether a
COMPOUND reaches that boundary is unproven, so this is a guard
rather than a fix.
Link: https://patch.msgid.link/20260817-jean-v1-2-9e356596ab85@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
