!10 update mdadm version to 4.1-1

Merge pull request !10 from wguanghao/develop
This commit is contained in:
openeuler-ci-bot 2020-07-01 11:45:06 +08:00 committed by Gitee
commit f8a90e6fa5
17 changed files with 21 additions and 81 deletions

View File

@ -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

View File

@ -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

Binary file not shown.

View File

@ -1,29 +1,27 @@
Name: mdadm Name: mdadm
Version: 4.1 Version: 4.1
Release: rc2.0.11 Release: 1
Summary: The software RAID arrays user manage tools Summary: The software RAID arrays user manage tools
License: GPLv2+ License: GPLv2+
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ 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 Source1: mdcheck-cron
Source2: mdmonitor.service Source2: mdmonitor.service
Source3: mdadm.conf Source3: mdadm.conf
Patch0: 0000-Assemble-free-resources-in-load_devices.patch Patch0: 0000-Document-PART-POLICY-lines.patch
Patch1: 0001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch Patch1: 0001-Grow-avoid-overflow-in-compute_backup_blocks.patch
Patch2: 0002-Document-PART-POLICY-lines.patch Patch2: 0002-Grow-report-correct-new-chunk-size.patch
Patch3: 0003-Grow-avoid-overflow-in-compute_backup_blocks.patch Patch3: 0003-Fix-spelling-typos.patch
Patch4: 0004-Grow-report-correct-new-chunk-size.patch Patch4: 0004-Detail.c-do-not-skip-first-character-when-calling-xs.patch
Patch5: 0005-Fix-spelling-typos.patch Patch5: 0005-Fix-reshape-for-decreasing-data-offset.patch
Patch6: 0006-Detail.c-do-not-skip-first-character-when-calling-xs.patch Patch6: 0006-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
Patch7: 0007-Fix-reshape-for-decreasing-data-offset.patch Patch7: 0007-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch
Patch8: 0008-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch Patch8: 0008-Assemble-Fix-starting-array-with-initial-reshape-che.patch
Patch9: 0009-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch Patch9: 0009-add-missing-units-to-examine.patch
Patch10: 0010-Assemble-Fix-starting-array-with-initial-reshape-che.patch Patch10: 0010-Create-Block-rounding-size-to-max.patch
Patch11: 0011-add-missing-units-to-examine.patch Patch11: 0011-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch
Patch12: 0012-Create-Block-rounding-size-to-max.patch
Patch13: 0013-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch
BuildRequires: systemd gcc binutils BuildRequires: systemd gcc binutils
Requires(post): systemd coreutils Requires(post): systemd coreutils
@ -44,7 +42,7 @@ BuildArch: noarch
This contains man files for the using of mdadm. This contains man files for the using of mdadm.
%prep %prep
%autosetup -n %{name}-%{version}_rc2 -p1 %autosetup -n %{name}-%{version} -p1
%build %build
%make_build CXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" SYSCONFDIR="%{_sysconfdir}" mdadm mdmon %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*/* %{_mandir}/man*/*
%changelog %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 * Mon Jun 29 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 4.1-rc2.0.11
- Type:enhancemnet - Type:enhancemnet
- ID:NA - ID:NA