From d8601fd4b67dafef2ef3d16811908475d4aad113 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 10 Mar 2011 03:03:03 +0000 Subject: [PATCH] Avoid possible endless loop in _free_vginfo when 4 or more VGs have same name. --- WHATS_NEW | 1 + lib/cache/lvmcache.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 0b6706da5..5bec4f9f7 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.85 - =================================== + Avoid possible endless loop in _free_vginfo when 4 or more VGs have same name. Use empty string instead of /dev// for LV path when there's no VG. Don't allocate unused VG mempool in _pvsegs_sub_single. Remove uninitialised byte from end of local clvmd messages. diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 0a8693c6c..523b19615 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -845,7 +845,7 @@ static int _free_vginfo(struct lvmcache_vginfo *vginfo) vginfo2->next = vginfo->next; break; } - while ((vginfo2 = primary_vginfo->next)); + while ((vginfo2 = vginfo2->next)); if (vginfo->vgname) dm_free(vginfo->vgname); -- 2.43.5