git: 63e5c83e8db3 - stable/15 - nfs_nfsdstate.c: Add an extra safety belt check for the backchannel
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Oct 2026 02:58:08 UTC
The branch stable/15 has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=63e5c83e8db3ad46923a8d97d2d72bd00f178111
commit 63e5c83e8db3ad46923a8d97d2d72bd00f178111
Author: Vinicius Ferrao <ferrao@versatushpc.com.br>
AuthorDate: 2026-10-04 21:28:25 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-10-11 02:56:22 +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.
(cherry picked from commit a52c50b4b7c2652954ef1bd34710a4b1fc8ef391)
---
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 c14dbecd72b2..9e64f3492939 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -4405,7 +4405,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,