Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2015 13:32:20 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287667 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201509111332.t8BDWKC6054737@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Sep 11 13:32:19 2015
New Revision: 287667
URL: https://svnweb.freebsd.org/changeset/base/287667

Log:
  MFC r287100: spa_import_rootpool: prevent lock and resource leak
  
  PR:		198563

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Fri Sep 11 12:59:16 2015	(r287666)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Fri Sep 11 13:32:19 2015	(r287667)
@@ -4129,6 +4129,8 @@ spa_import_rootpool(const char *name)
 		    &spa->spa_ubsync.ub_version) != 0)
 			spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL;
 	} else if ((spa = spa_lookup(name)) == NULL) {
+		mutex_exit(&spa_namespace_lock);
+		nvlist_free(config);
 		cmn_err(CE_NOTE, "Cannot find the pool label for '%s'",
 		    name);
 		return (EIO);



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