Author: rmacklem
Date: Sat Sep 21 22:07:24 2013
New Revision: 255769
URL: http://svnweb.freebsd.org/changeset/base/255769

Log:
  MFC: r255216
  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.

Modified:
  stable/9/sys/fs/nfsclient/nfs_clkrpc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/nfsclient/nfs_clkrpc.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clkrpc.c      Sat Sep 21 21:40:57 2013        
(r255768)
+++ stable/9/sys/fs/nfsclient/nfs_clkrpc.c      Sat Sep 21 22:07:24 2013        
(r255769)
@@ -270,20 +270,13 @@ nfsrvd_cbinit(int terminating)
 
        NFSD_LOCK_ASSERT();
 
-       if (terminating) {
+       if (nfscbd_pool == NULL) {
                NFSD_UNLOCK();
-               svcpool_destroy(nfscbd_pool);
-               nfscbd_pool = NULL;
+               nfscbd_pool = svcpool_create("nfscbd", NULL);
+               nfscbd_pool->sp_rcache = NULL;
+               nfscbd_pool->sp_assign = NULL;
+               nfscbd_pool->sp_done = NULL;
                NFSD_LOCK();
        }
-
-       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();
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"

Reply via email to