Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2013 22:47:56 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255216 - head/sys/fs/nfsclient
Message-ID:  <201309042247.r84Mluxv013645@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed Sep  4 22:47:56 2013
New Revision: 255216
URL: http://svnweb.freebsd.org/changeset/base/255216

Log:
  Crashes have been observed for NFSv4.1 mounts when the system
  is being shut down which were caused by the nfscbd_pool being
  destroyed before the backchannel is disabled. This patch is
  believed to fix the problem, by simply avoiding ever destroying
  the nfscbd_pool. Since the NFS client module cannot be unloaded,
  this should not cause a memory leak.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clkrpc.c

Modified: head/sys/fs/nfsclient/nfs_clkrpc.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clkrpc.c	Wed Sep  4 22:10:16 2013	(r255215)
+++ head/sys/fs/nfsclient/nfs_clkrpc.c	Wed Sep  4 22:47:56 2013	(r255216)
@@ -278,17 +278,15 @@ nfsrvd_cbinit(int terminating)
 		while (nfs_numnfscbd > 0)
 			msleep(&nfs_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, 
 			    "nfscbdt", 0);
-		NFSD_UNLOCK();
-		svcpool_destroy(nfscbd_pool);
-		nfscbd_pool = NULL;
-	} else
-		NFSD_UNLOCK();
+	}
 
-	nfscbd_pool = svcpool_create("nfscbd", NULL);
-	nfscbd_pool->sp_rcache = NULL;
-	nfscbd_pool->sp_assign = NULL;
-	nfscbd_pool->sp_done = NULL;
-
-	NFSD_LOCK();
+	if (nfscbd_pool == NULL) {
+		NFSD_UNLOCK();
+		nfscbd_pool = svcpool_create("nfscbd", NULL);
+		nfscbd_pool->sp_rcache = NULL;
+		nfscbd_pool->sp_assign = NULL;
+		nfscbd_pool->sp_done = NULL;
+		NFSD_LOCK();
+	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309042247.r84Mluxv013645>