From owner-svn-src-all@FreeBSD.ORG Sat Sep 21 22:07:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C78F71D2; Sat, 21 Sep 2013 22:07:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4C562B15; Sat, 21 Sep 2013 22:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LM7O2a001391; Sat, 21 Sep 2013 22:07:24 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LM7OcC001390; Sat, 21 Sep 2013 22:07:24 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309212207.r8LM7OcC001390@svn.freebsd.org> From: Rick Macklem Date: Sat, 21 Sep 2013 22:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255769 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 22:07:24 -0000 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(); }