FreeBSD: Fix potential boot panic with bad label
vdev_geom_read_pool_label() can leave NULL in configs. Check for it and skip consistently when generating rootconf. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #14291
This commit is contained in:
parent
018f26041d
commit
dc8c2f6158
|
@ -94,6 +94,8 @@ spa_generate_rootconf(const char *name)
|
|||
for (i = 0; i < count; i++) {
|
||||
uint64_t txg;
|
||||
|
||||
if (configs[i] == NULL)
|
||||
continue;
|
||||
txg = fnvlist_lookup_uint64(configs[i], ZPOOL_CONFIG_POOL_TXG);
|
||||
if (txg > best_txg) {
|
||||
best_txg = txg;
|
||||
|
|
Loading…
Reference in New Issue