Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2010 10:08:05 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208442 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201005231008.o4NA85Eu042159@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Sun May 23 10:08:05 2010
New Revision: 208442
URL: http://svn.freebsd.org/changeset/base/208442

Log:
  Fix mutex_exit misorder that can cause a kernel panic.
  
  OpenSolaris onnv revision:	8667:5c308a17eb7c
  
  Approved by:	delphij (mentor)
  Obtained from:	OpenSolaris (Bug ID 6795440)
  MFC after:	1 day

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	Sun May 23 09:44:48 2010	(r208441)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Sun May 23 10:08:05 2010	(r208442)
@@ -2082,10 +2082,10 @@ spa_create(const char *pool, nvlist_t *n
 	if (version >= SPA_VERSION_ZPOOL_HISTORY && history_str != NULL)
 		(void) spa_history_log(spa, history_str, LOG_CMD_POOL_CREATE);
 
-	mutex_exit(&spa_namespace_lock);
-
 	spa->spa_minref = refcount_count(&spa->spa_refcount);
 
+	mutex_exit(&spa_namespace_lock);
+
 	return (0);
 }
 



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