7f9b3f4598
- backport patches for lvm2 to avoid software abnormal work (bsc#1158861) + bug-1158861_01-config-remove-filter-typo.patch + bug-1158861_02-config-Fix-default-option-which-makes-no-sense.patch + bug-1158861_03-vgchange-don-t-fail-monitor-command-if-vg-is-exporte.patch + bug-1158861_04-fix-duplicate-pv-size-check.patch + bug-1158861_05-hints-fix-copy-of-filter.patch + bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch + bug-1158861_07-vgck-let-updatemetadata-repair-mismatched-metadata.patch + bug-1158861_08-hints-fix-mem-leaking-buffers.patch + bug-1158861_09-pvcreate-pvremove-fix-reacquiring-global-lock-after.patch - add necessary patches for passing lvm2 testsuite (bsc#1158628) + bug-1158628_01-tests-replaces-grep-q-usage.patch + bug-1158628_02-tests-fix-ra-checking.patch + bug-1158628_03-tests-simplify-some-var-settings.patch + bug-1158628-04-pvmove-correcting-read_ahead-setting.patch + bug-1158628_05-activation-add-synchronization-point.patch + bug-1158628_06-pvmove-add-missing-synchronization.patch + bug-1158628_07-activation-extend-handling-of-pending_delete.patch + bug-1158628_08-lv_manip-add-synchronizations.patch + bug-1158628_09-lvconvert-improve-validation-thin-and-cache-pool-con.patch + bug-1158628_10-thin-activate-layer-pool-aas-read-only-LV.patch + bug-1158628_11-tests-mdadm-stop-in-test-cleanup.patch + bug-1158628_12-test-increase-size-of-raid10-LV-allowing-tests-to-su.patch + bug-1158628_13-lvconvert-fix-return-value-when-zeroing-fails.patch + bug-1158628_14-tests-add-extra-settle.patch + bug-1158628_15-test-Fix-handling-leftovers-from-previous-tests.patch OBS-URL: https://build.opensuse.org/request/show/755483 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=260
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 7cfbf3a394c2663fbeed17705320b83e69781720 Mon Sep 17 00:00:00 2001
|
|
From: David Teigland <teigland@redhat.com>
|
|
Date: Thu, 29 Aug 2019 11:35:46 -0500
|
|
Subject: [PATCH] fix segfault for invalid characters in vg name
|
|
|
|
Fixes a regression from commit ba7ff96faff0
|
|
"improve reading and repairing vg metadata"
|
|
|
|
where the error path for a vg name with invalid
|
|
charaters was missing an error flag, which led
|
|
to the caller not recognizing an error occured.
|
|
Previously, an error flag was hidden in the old
|
|
_vg_make_handle function.
|
|
---
|
|
lib/metadata/metadata.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff -Nupr a/lib/metadata/metadata.c b/lib/metadata/metadata.c
|
|
--- a/lib/metadata/metadata.c 2019-12-09 15:26:11.751210108 +0800
|
|
+++ b/lib/metadata/metadata.c 2019-12-09 15:26:58.103346514 +0800
|
|
@@ -4829,7 +4829,8 @@ struct volume_group *vg_read(struct cmd_
|
|
|
|
if (!validate_name(vg_name)) {
|
|
log_error("Volume group name \"%s\" has invalid characters.", vg_name);
|
|
- return NULL;
|
|
+ failure |= FAILED_NOTFOUND;
|
|
+ goto_bad;
|
|
}
|
|
|
|
if (!lock_vol(cmd, vg_name, writing ? LCK_VG_WRITE : LCK_VG_READ, NULL)) {
|