diff --git a/0000-Assemble-free-resources-in-load_devices.patch b/0000-Assemble-free-resources-in-load_devices.patch deleted file mode 100644 index 30c0982..0000000 --- a/0000-Assemble-free-resources-in-load_devices.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e4317882e4c87a121b721cdb22cf41cc830c379d Mon Sep 17 00:00:00 2001 -From: root -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 - diff --git a/0001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch b/0001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch deleted file mode 100644 index b8a1981..0000000 --- a/0001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 13150f803a18df9b2feddd424bf513b8806bc7e8 Mon Sep 17 00:00:00 2001 -From: root -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 - diff --git a/mdadm-4.1-rc2.tar.xz b/mdadm-4.1-rc2.tar.xz deleted file mode 100644 index 19bb1a0..0000000 Binary files a/mdadm-4.1-rc2.tar.xz and /dev/null differ diff --git a/mdadm-4.1.tar.xz b/mdadm-4.1.tar.xz new file mode 100644 index 0000000..169dfc0 Binary files /dev/null and b/mdadm-4.1.tar.xz differ diff --git a/mdadm.spec b/mdadm.spec index efe7eea..f50148a 100644 --- a/mdadm.spec +++ b/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 - 4.1-1 +- Type:enhancemnet +- ID:NA +- SUG:NA +- DESC: update mdadm version to 4.1-1 + * Mon Jun 29 2020 Zhiqiang Liu - 4.1-rc2.0.11 - Type:enhancemnet - ID:NA