update mdadm version to 4.1-1
This commit is contained in:
parent
85f3e139c4
commit
2046d9805c
@ -1,28 +0,0 @@
|
||||
From e4317882e4c87a121b721cdb22cf41cc830c379d Mon Sep 17 00:00:00 2001
|
||||
From: root <root@localhost.localdomain>
|
||||
Date: Wed, 10 Apr 2019 21:31:46 +0800
|
||||
Subject: [PATCH 1/6] Assemble: free resources in load_devices
|
||||
|
||||
Like other failure cases in load_devices, we need
|
||||
to free those resources as well.
|
||||
---
|
||||
Assemble.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/Assemble.c b/Assemble.c
|
||||
index 23892a3..0264190 100644
|
||||
--- a/Assemble.c
|
||||
+++ b/Assemble.c
|
||||
@@ -594,6 +594,9 @@ static int load_devices(struct devs *devices, char *devmap,
|
||||
if (strcmp(c->update, "ppl") == 0 &&
|
||||
ident->bitmap_fd >= 0) {
|
||||
pr_err("PPL is not compatible with bitmap\n");
|
||||
+ close(mdfd);
|
||||
+ free(devices);
|
||||
+ free(devmap);
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
From 13150f803a18df9b2feddd424bf513b8806bc7e8 Mon Sep 17 00:00:00 2001
|
||||
From: root <root@localhost.localdomain>
|
||||
Date: Wed, 10 Apr 2019 21:33:29 +0800
|
||||
Subject: [PATCH 2/6] Assemble: set devices to NULL when load_devices can't
|
||||
load device
|
||||
|
||||
Since load_devices frees "devices" when it can't find any
|
||||
device, we should set it to NULL to avoid double free issue
|
||||
which can be reproduced by below steps:
|
||||
|
||||
mdadm -CR /dev/md/vol -l0 -e 1.2 -n2 /dev/sd[b-c] --assume-clean
|
||||
mdadm -Ss
|
||||
mdadm -A /dev/md127 /dev/sd[b-c] --update metadata
|
||||
---
|
||||
Assemble.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/Assemble.c b/Assemble.c
|
||||
index 0264190..a79466c 100644
|
||||
--- a/Assemble.c
|
||||
+++ b/Assemble.c
|
||||
@@ -1539,6 +1539,11 @@ try_again:
|
||||
&most_recent, &bestcnt, &best, inargv);
|
||||
if (devcnt < 0) {
|
||||
mdfd = -3;
|
||||
+ /*
|
||||
+ * devices is already freed in load_devices, so set devices
|
||||
+ * to NULL to avoid double free devices.
|
||||
+ */
|
||||
+ devices = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
Binary file not shown.
BIN
mdadm-4.1.tar.xz
Normal file
BIN
mdadm-4.1.tar.xz
Normal file
Binary file not shown.
14
mdadm.spec
14
mdadm.spec
@ -1,17 +1,15 @@
|
||||
Name: mdadm
|
||||
Version: 4.1
|
||||
Release: rc2.0.11
|
||||
Release: 1
|
||||
Summary: The software RAID arrays user manage tools
|
||||
License: GPLv2+
|
||||
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
||||
|
||||
Source0: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-rc2.tar.xz
|
||||
Source0: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
|
||||
Source1: mdcheck-cron
|
||||
Source2: mdmonitor.service
|
||||
Source3: mdadm.conf
|
||||
|
||||
Patch0: 0000-Assemble-free-resources-in-load_devices.patch
|
||||
Patch1: 0001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch
|
||||
Patch2: 0002-Document-PART-POLICY-lines.patch
|
||||
Patch3: 0003-Grow-avoid-overflow-in-compute_backup_blocks.patch
|
||||
Patch4: 0004-Grow-report-correct-new-chunk-size.patch
|
||||
@ -44,7 +42,7 @@ BuildArch: noarch
|
||||
This contains man files for the using of mdadm.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}_rc2 -p1
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%make_build CXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" SYSCONFDIR="%{_sysconfdir}" mdadm mdmon
|
||||
@ -86,6 +84,12 @@ install -d -m 710 %{buildroot}/var/run/mdadm/
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 30 2020 wuguanghao<wuguanghao3@huawei.com> - 4.1-1
|
||||
- Type:enhancemnet
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: update mdadm version to 4.1-1
|
||||
|
||||
* Mon Jun 29 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 4.1-rc2.0.11
|
||||
- Type:enhancemnet
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user