svn commit: r287100 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Mon Aug 24 08:44:46 UTC 2015
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 at 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);
More information about the svn-src-all
mailing list