b74c0695d2
LVM Metadata Error: Error writing device at 4096 length 512 (bsc#1150021) + bug-1150021_01-scanning-open-devs-rw-when-rescanning-for-write.patch + bug-1150021_02-bcache-add-bcache_abort.patch + bug-1150021_03-label-Use-bcache_abort_fd-to-ensure-blocks-are-no-lo.patch + bug-1150021_04-bcache-add-unit-test.patch + bug-1150021_05-bcache-bcache_invalidate_fd-only-remove-prefixes-on.patch + bug-1150021_06-fix-dev_unset_last_byte-after-write-error.patch - Update patch, according to bug-1150021_01-scanning-xxx.patch + bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch OBS-URL: https://build.opensuse.org/request/show/759060 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=263
35 lines
1.0 KiB
Diff
35 lines
1.0 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 --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
|
|
index 2c61bdeca2..6d21ff99cc 100644
|
|
--- a/lib/metadata/metadata.c
|
|
+++ b/lib/metadata/metadata.c
|
|
@@ -4900,7 +4900,8 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const
|
|
|
|
if (!validate_name(vg_name)) {
|
|
log_error("Volume group name \"%s\" has invalid characters.", vg_name);
|
|
- return NULL;
|
|
+ failure |= FAILED_NOTFOUND;
|
|
+ goto_bad;
|
|
}
|
|
|
|
/*
|
|
--
|
|
2.16.4
|
|
|