diff --git a/WHATS_NEW b/WHATS_NEW index 500b4eb55..c2cad9f33 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.34 - =================================== + Add check to vg_commit() ensuring VG lock held before writing new VG metadata. Add validation of LV name to pvmove -n. Make clvmd refresh the context correctly when lvm.conf is updated. Add some basic internal VG lock validation. diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 374501963..0abd5a57e 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -1316,6 +1316,12 @@ int vg_commit(struct volume_group *vg) int cache_updated = 0; int failed = 0; + if (!vgname_is_locked(vg->name)) { + log_error("Internal error: Attempt to write new VG metadata " + "without locking %s", vg->name); + return cache_updated; + } + /* Commit to each copy of the metadata area */ list_iterate_items(mda, &vg->fid->metadata_areas) { failed = 0;