Author: avg
Date: Fri Sep 11 13:32:55 2015
New Revision: 287668
URL: https://svnweb.freebsd.org/changeset/base/287668

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

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

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c       Fri Sep 
11 13:32:19 2015        (r287667)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c       Fri Sep 
11 13:32:55 2015        (r287668)
@@ -4043,6 +4043,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);
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to