Skip to content

Commit a849dea

Browse files
committed
NFSD: Fix crash in nfsd4_read_release()
jira VULN-161290 cve CVE-2025-40324 commit-author Chuck Lever <chuck.lever@oracle.com> commit abb1f08 When tracing is enabled, the trace_nfsd_read_done trace point crashes during the pynfs read.testNoFh test. Fixes: 15a8b55 ("nfsd: call op_release, even when op_func returns an error") Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> (cherry picked from commit abb1f08) Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
1 parent 07961a8 commit a849dea

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

fs/nfsd/nfs4proc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -961,10 +961,11 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
961961
static void
962962
nfsd4_read_release(union nfsd4_op_u *u)
963963
{
964-
if (u->read.rd_nf)
964+
if (u->read.rd_nf) {
965+
trace_nfsd_read_done(u->read.rd_rqstp, u->read.rd_fhp,
966+
u->read.rd_offset, u->read.rd_length);
965967
nfsd_file_put(u->read.rd_nf);
966-
trace_nfsd_read_done(u->read.rd_rqstp, u->read.rd_fhp,
967-
u->read.rd_offset, u->read.rd_length);
968+
}
968969
}
969970

970971
static __be32

0 commit comments

Comments
 (0)