Author: avg Date: Mon Aug 24 08:44:44 2015 New Revision: 287100 URL: https://svnweb.freebsd.org/changeset/base/287100
Log: spa_import_rootpool: prevent lock and resource leak The lock leak could lead to a deadlock later. PR: 198563 Submitted by: Fabian Keil <f...@fabiankeil.de> MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Aug 24 08:10:52 2015 (r287099) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Aug 24 08:44:44 2015 (r287100) @@ -4146,6 +4146,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-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"