[lvm-devel] master - liblvm: Fix segfault in lvm_pv_remove.

Alasdair Kergon agk at sourceware.org
Mon Oct 30 22:10:24 UTC 2017


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=248144d06654a509249938c44bb68ece4a71e6f1
Commit:        248144d06654a509249938c44bb68ece4a71e6f1
Parent:        7e3be7d1ba4c6ae56dd80ec7ae098e9e451de775
Author:        Alasdair G Kergon <agk at redhat.com>
AuthorDate:    Mon Oct 30 22:03:35 2017 +0000
Committer:     Alasdair G Kergon <agk at redhat.com>
CommitterDate: Mon Oct 30 22:03:35 2017 +0000

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 insertions(+), 3 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index 0ee52ba..ab4f656 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 f37008d..4202950 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;
 




More information about the lvm-devel mailing list