From 2fde4399a01a002437d6d882c7faa59221aca93e Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Fri, 26 Aug 2016 01:21:01 +0100 Subject: [PATCH] lvconvert: Fix --splitmirrors segfault with incorrect PV. Commit 9ee071705b2c35e1132f39f5731861c831a1bb6b misunderstood integer promotion, but it's simpler to detect -1 more directly. --- WHATS_NEW | 1 + lib/metadata/raid_manip.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 99d31bef3..1c0bcf454 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.165 - =================================== + Give error not segfault in lvconvert --splitmirrors when PV lies outside LV. Fix typo in report/columns_as_rows config option name recognition (2.02.99). Avoid PV tags when checking allocation against parallel PVs. Disallow mirror conversions of raid10 volumes. diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index d0934f424..e5fdf4f83 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -1497,7 +1497,7 @@ int lv_raid_split_and_track(struct logical_volume *lv, break; } - if (s >= (int) seg->area_count) { + if (s < 0) { log_error("Unable to find image to satisfy request"); return 0; } -- 2.43.5