Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
91ab636d66
!201 [sync] PR-199: 避免使用未被允许的%{python3_sitelib}/lvmdbsd目录
From: @openeuler-sync-bot 
Reviewed-by: @kouwq 
Signed-off-by: @kouwq
2024-11-07 05:47:44 +00:00
沈仲伟
0310c94cb0 Avoid unowned %%{python3_sitelib}/lvmdbusd directory
(cherry picked from commit 049b1bc07b3948a15069a03ddac2fc2687547545)
2024-11-07 09:38:20 +08:00
openeuler-ci-bot
de49f9dfe7
!196 [sync] PR-183: fix 2 undeclared functions,and changelog format,support clang build
From: @openeuler-sync-bot 
Reviewed-by: @kouwq 
Signed-off-by: @kouwq
2024-10-25 09:07:26 +00:00
yuncang123
33e9e09d3b fix function undeclared in libdm-common.c and dev-cache.c,fix date in changelog,support clang
(cherry picked from commit fa38e346cbd4fd246b5520fb375fcf03963f124b)
2024-10-25 16:29:52 +08:00
openeuler-ci-bot
8712e3036e
!193 [sync] PR-191: dmstats: Fix memory leak on error path
From: @openeuler-sync-bot 
Reviewed-by: @kouwq 
Signed-off-by: @kouwq
2024-10-25 07:27:37 +00:00
yanshuai01
bcfb1c7021 dmstats: Fix memory leak on error path
(cherry picked from commit 6a44c0a064e44dc7023ff789a83f3ed2f4a6e4cd)
2024-10-25 14:22:43 +08:00
openeuler-ci-bot
e885d0f33d
!178 [sync] PR-176: update repo url
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-08-31 01:39:55 +00:00
Funda Wang
a75675e632 update repo url
(cherry picked from commit d788c6cdff92f80410829958bc331f32f7646dd1)
2024-08-27 19:48:26 +08:00
openeuler-ci-bot
36a6ba3b31
!173 [sync] PR-172: lvmcache: fix memleaks on list removal
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-08-27 02:00:29 +00:00
Kou Wenqi
23c7a0db87 fix memleaks on list removal
(cherry picked from commit 715ac101c882fde8fa55b2558254ce8cc7f6529b)
2024-08-22 16:26:40 +08:00
5 changed files with 156 additions and 4 deletions

View File

@ -0,0 +1,70 @@
From f59ec61fa79001bd440d0bec32a59971efa2d032 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Wed, 3 Apr 2024 17:54:48 -0500
Subject: [PATCH] lvmcache: fix memleaks on list removal
Reference:https://github.com/lvmteam/lvm2/commit/f59ec61fa79001bd440d0bec32a59971efa2d032
---
lib/cache/lvmcache.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index b8a9eac..2315d8e 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -912,8 +912,10 @@ next:
}
/* Remove dev_mpath from altdevs. */
- if ((devl = device_list_find_dev(&altdevs, dev_mpath)))
+ if ((devl = device_list_find_dev(&altdevs, dev_mpath))) {
dm_list_del(&devl->list);
+ free(devl);
+ }
/* Remove info from lvmcache that came from the component dev. */
log_debug("Ignoring multipath component %s with PVID %s (dropping info)", dev_name(dev_drop), pvid);
@@ -950,6 +952,7 @@ next:
log_debug("Ignoring multipath component %s with PVID %s (dropping duplicate)", dev_name(dev_drop), pvid);
dm_list_del(&devl->list);
+ free(devl);
cmd->filter->wipe(cmd, cmd->filter, dev_drop, NULL);
dev_drop->flags &= ~DEV_SCAN_FOUND_LABEL;
@@ -979,8 +982,10 @@ next:
}
/* Remove dev_md from altdevs. */
- if ((devl = device_list_find_dev(&altdevs, dev_md)))
+ if ((devl = device_list_find_dev(&altdevs, dev_md))) {
dm_list_del(&devl->list);
+ free(devl);
+ }
/* Remove info from lvmcache that came from the component dev. */
log_debug("Ignoring md component %s with PVID %s (dropping info)", dev_name(dev_drop), pvid);
@@ -1007,8 +1012,10 @@ next:
}
/* Remove dev_md from altdevs. */
- if ((devl = device_list_find_dev(&altdevs, dev_md)))
- dm_list_del(&devl->list);
+ if ((devl = device_list_find_dev(&altdevs, dev_md))) {
+ dm_list_del(&devl->list);
+ free(devl);
+ }
}
if (info && !dev_md) {
@@ -1036,6 +1043,7 @@ next:
log_debug("Ignoring md component %s with PVID %s (dropping duplicate)", dev_name(dev_drop), pvid);
dm_list_del(&devl->list);
+ free(devl);
cmd->filter->wipe(cmd, cmd->filter, dev_drop, NULL);
dev_drop->flags &= ~DEV_SCAN_FOUND_LABEL;
--
2.27.0

View File

@ -0,0 +1,25 @@
From d1f0b89e65fd8817930bbf89051fe03efb0a1db5 Mon Sep 17 00:00:00 2001
From: Marian Csontos <mcsontos@redhat.com>
Date: Tue, 28 Nov 2023 21:41:35 +0100
Subject: [PATCH] dmstats: Fix memory leak on error path
---
libdm/libdm-stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index dc2907f..62be5de 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -1970,7 +1970,7 @@ static int _stats_create_region(struct dm_stats *dms, uint64_t *region_id,
(strlen(hist_arg)) ? HISTOGRAM_ARG : "",
hist_arg)) < 0) {
log_error(err_fmt, PRECISE_ARG " option.");
- return 0;
+ goto out;
}
} else
opt_args = dm_strdup("");
--
2.27.0

View File

@ -0,0 +1,37 @@
From e5ce6e143393fe50da73eabdf32ce3dafb7b9dd7 Mon Sep 17 00:00:00 2001
From: yuncang123 <1050706328@qq.com>
Date: Sat, 7 Sep 2024 18:34:09 +0800
Subject: [PATCH] fix function undeclared in libdm-common.c and dev-cache.c
---
lib/device/dev-cache.c | 1 +
libdm/libdm-common.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index 85f9b49..ee39814 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -31,6 +31,7 @@
#include <locale.h>
/* coverity[unnecessary_header] needed for MuslC */
#include <sys/file.h>
+#include <sys/time.h>
struct dev_iter {
struct btree_iter *current;
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 734a012..177dc40 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -24,6 +24,7 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <dirent.h>
+#include <syslog.h>
#ifdef UDEV_SYNC_SUPPORT
# include <sys/types.h>
--
2.43.0

View File

@ -43,7 +43,7 @@
Name: lvm2
Version: 2.03.21
Release: 10
Release: 14
Epoch: 8
Summary: Tools for logical volume management
License: GPLv2+ and LGPLv2.1 and BSD
@ -69,6 +69,9 @@ Patch17: 0017-clean-up-group-struct-in-_stats_create_group-error-path.patch
Patch18: 0018-do-not-pass-empty-string-in-callback.patch
Patch19: 0019-fix-memleak-in-vgchange.patch
Patch20: 0020-udev-create-dev-disk-by-label-symlinks-for-DM-devs-t.patch
Patch21: 0021-lvmcache-fix-memleaks-on-list-removal.patch
Patch22: 0022-dmstats-Fix-memory-leak-on-error-path.patch
Patch23: 0023-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -485,7 +488,7 @@ fi
%{_sysconfdir}/dbus-1/system.d/com.redhat.lvmdbus1.conf
%{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service
%{_unitdir}/lvm2-lvmdbusd.service
%{python3_sitelib}/lvmdbusd/*
%{python3_sitelib}/lvmdbusd
%files test
%license COPYING COPYING.LIB COPYING.BSD
@ -495,6 +498,23 @@ fi
%changelog
* Tue Nov 05 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 8:2.03.21-14
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Avoid unowned %%{python3_sitelib}/lvmdbusd directory
* Fri Oct 25 2024 yuanchao <1050706328@qq.com> - 8:2.03.21-13
- support clang build:
- fix function undeclared in libdm-common.c and dev-cache.c
- fix changelog to be in descending chronological order
* Wed Oct 23 2024 yanshuai <yanshuai@kylinos.cn> - 8:2.03.21-12
- dmstats: Fix memory leak on error path
* Tue Aug 6 2024 kouwenqi <kouwenqi@kylinos.cn> - 8:2.03.21-11
- lvmcache: fix memleaks on list removal
* Mon Jun 24 2024 wangziliang <wangziliang@kylinos.cn> - 8:2.03.21-10
- backport upstream patch
@ -513,7 +533,7 @@ fi
* Mon Jan 22 2024 peng.zou <peng.zou@shingroup.cn> - 8:2.03.22-4
- lvm2-lockd: add suport for ppc64le
* Wed Nov 22 2023 wangxiaomeng <wangxiaomeng@kylinos.cn> - 8:2.03.22-3
* Tue Jan 9 2024 wangxiaomeng <wangxiaomeng@kylinos.cn> - 8:2.03.22-3
- lvmlockd: add suport for loongarch64
* Tue Dec 19 2023 wangzhiqiang <wangzhiqiang95@huawei.com> - 8:2.03.22-2

View File

@ -1,4 +1,4 @@
version_control: git
src_repo: git://sourceware.org/git/lvm2.git
src_repo: git://gitlab.com/lvmteam/lvm2
tag_prefix: "^v"
seperator: "_"