From 248144d06654a509249938c44bb68ece4a71e6f1 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Mon, 30 Oct 2017 22:03:35 +0000 Subject: [PATCH] liblvm: Fix segfault in lvm_pv_remove. Since 4fa5add6b1bd4d7f7313f2950021a09e4130ad08 ("pvcreate: Wipe cached bootloaderarea when wiping label.") label_remove is responsible for the lvmcache_del. (toollib and liblvm need fixing to share the code.) --- WHATS_NEW | 1 + lib/metadata/metadata-liblvm.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 0ee52bae9..ab4f656d3 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.176 - =================================== + liblvm: Fix segfault in lvm_pv_remove. (2.02.173) Do not allow storing VG metadata with LV without any segment. Fix printed message when thin snapshot was already merged. Remove created spare LV when creation of thin-pool failed. diff --git a/lib/metadata/metadata-liblvm.c b/lib/metadata/metadata-liblvm.c index f37008d2a..420295002 100644 --- a/lib/metadata/metadata-liblvm.c +++ b/lib/metadata/metadata-liblvm.c @@ -602,9 +602,6 @@ static int _pvremove_single(struct cmd_context *cmd, const char *pv_name, goto out; } - if (info) - lvmcache_del(info); - if (!lvmetad_pv_gone_by_dev(dev)) goto_out;