diff --git a/WHATS_NEW b/WHATS_NEW index 0b96df0d1..46d7d2365 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Fix segfault when reporting raid_syncaction for older kernels. Add LV reporting fields raid_mismatch_count, raid_sync_action, raid_write_behind. Add LV reporting fields raid_min_recovery_rate, raid_max_recovery_rate. Add sync_percent as alias for copy_percent LV reporting field. diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 204cceb40..61dbc02a9 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -874,7 +874,9 @@ int lv_raid_sync_action(const struct logical_volume *lv, char **sync_action) if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1))) return_0; + /* status->sync_action can be NULL if dm-raid version < 1.5.0 */ if (!dev_manager_raid_status(dm, lv, &status) || + !status->sync_action || !(action = dm_pool_strdup(lv->vg->cmd->mem, status->sync_action))) { dev_manager_destroy(dm);