1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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
This commit is contained in:
Andriy Gapon 2012-11-24 13:14:53 +00:00
parent 6b991098a7
commit cfca00a2fb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243500

View File

@ -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);