summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2015-12-05 21:38:53 +0000
committerrmacklem <rmacklem@FreeBSD.org>2015-12-05 21:38:53 +0000
commit11ddbfbc5cbb55d74dd49e7d13251e56cb1dff91 (patch)
treed8031cefd74dad50d37ce43a720029b712d391f1 /sys/fs/nfs
parent8e2b2c5eb5f3434f37c9d01effd9dcdb733a8a26 (diff)
downloadFreeBSD-src-11ddbfbc5cbb55d74dd49e7d13251e56cb1dff91.zip
FreeBSD-src-11ddbfbc5cbb55d74dd49e7d13251e56cb1dff91.tar.gz
MFC: r291150
When the nfsd threads are terminated, the NFSv4 server state (opens, locks, etc) is retained, which I believe is correct behaviour. However, for NFSv4.1, the server also retained a reference to the xprt (RPC transport socket structure) for the backchannel. This caused svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed a socket upcall to occur after the mutexes in the svcpool were destroyed, causing a crash. This patch fixes the code so that the backchannel xprt structure is dereferenced just before svcpool_destroy() is called, so the code does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r--sys/fs/nfs/nfs_var.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 2abd7e4..d540dc9 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -135,6 +135,7 @@ int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *,
uint32_t *, int, uint32_t *, NFSPROC_T *);
int nfsrv_checkreclaimcomplete(struct nfsrv_descript *);
void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
+void nfsrv_freeallbackchannel_xprts(void);
/* nfs_nfsdserv.c */
int nfsrvd_access(struct nfsrv_descript *, int,
OpenPOWER on IntegriCloud