svn commit: r243500 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Sat Nov 24 13:14:53 UTC 2012


Author: avg
Date: Sat Nov 24 13:14:53 2012
New Revision: 243500
URL: http://svnweb.freebsd.org/changeset/base/243500

Log:
  spa_import_rootpool: do not call spa_history_log_version
  
  The call is a NOP, because pool version in spa_ubsync.ub_version is not
  initialized and thus appears to be zero.
  If the version is properly set then the call leads to a NULL pointer
  dereference because the spa object is still under-constructed.
  
  The same change was independently made in the upstream as a part of
  a larger change (4445fffbbb1ea25fd0e9ea68b9380dd7a6709025).
  
  MFC after:	6 days

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	Sat Nov 24 13:11:47 2012	(r243499)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Sat Nov 24 13:14:53 2012	(r243500)
@@ -3865,8 +3865,6 @@ spa_import_rootpool(const char *name)
 		return (error);
 	}
 
-	spa_history_log_version(spa, LOG_POOL_IMPORT);
-
 	spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
 	vdev_free(rvd);
 	spa_config_exit(spa, SCL_ALL, FTAG);


More information about the svn-src-all mailing list