git: a52c50b4b7c2 - main - nfs_nfsdstate.c: Add an extra safety belt check for the backchannel
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 Oct 2026 21:30:59 UTC
The branch main has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=a52c50b4b7c2652954ef1bd34710a4b1fc8ef391
commit a52c50b4b7c2652954ef1bd34710a4b1fc8ef391
Author: Vinicius Ferrao <ferrao@versatushpc.com.br>
AuthorDate: 2026-10-04 21:28:25 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-10-04 21:28:25 +0000
nfs_nfsdstate.c: Add an extra safety belt check for the backchannel
I do not think that xp_p2 can be NULL at this point,
but add an extra safety belt, just in case.
Reviewed by: rmacklem
MFC after: 1 week
Sponsored by: VersatusHPC
---
sys/fs/nfsserver/nfs_nfsdstate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index d790ab974d07..2fdce567c1ce 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -4407,7 +4407,8 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp,
if (!error) {
if ((nd->nd_flag & ND_NFSV41) != 0) {
KASSERT(sep != NULL, ("sep NULL"));
- if (sep->sess_cbsess.nfsess_xprt != NULL)
+ if (sep->sess_cbsess.nfsess_xprt != NULL &&
+ sep->sess_cbsess.nfsess_xprt->xp_p2 != NULL)
error = newnfs_request(nd, NULL, clp,
&clp->lc_req, NULL, NULL, cred,
clp->lc_program, clp->lc_req.nr_vers, NULL,