Date: Mon, 24 Aug 2015 08:44:45 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287100 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201508240844.t7O8ijxD009408@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <fk@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508240844.t7O8ijxD009408>