1 Star 0 Fork 40

openeuler-embedded/lvm2

forked from src-openEuler/lvm2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0004-devs-check-for-no-dev-when-dropping-aliases.patch 905 Bytes
一键复制 编辑 原始数据 按行查看 历史
wj196 提交于 2020-07-16 14:44 . update lvm2 version to 2.03.09-1
From f50af80199f723f7b1970ee33ddf959ea79fcbef Mon Sep 17 00:00:00 2001
From: David Teigland <[email protected]>
Date: Wed, 16 Oct 2019 13:32:28 -0500
Subject: [PATCH 134/180] devs: check for no dev when dropping aliases
When scanning fails to find a device path and
looks for device aliases, check if the device
itself still exists to avoid a potential segfault.
---
lib/label/label.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/label/label.c b/lib/label/label.c
index 8107e33..e4a1068 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -734,6 +734,11 @@ static int _scan_list(struct cmd_context *cmd, struct dev_filter *f,
retried_open = 1;
dm_list_iterate_items_safe(devl, devl2, &reopen_devs) {
+ if (!devl->dev) {
+ dm_list_del(&devl->list);
+ continue;
+ }
+
_drop_bad_aliases(devl->dev);
if (dm_list_empty(&devl->dev->aliases)) {
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-embedded/lvm2.git
[email protected]:openeuler-embedded/lvm2.git
openeuler-embedded
lvm2
lvm2
openEuler-embedded

搜索帮助