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 30c0982bb10c415f78272e5bad85ca8e196711d0..0000000000000000000000000000000000000000 --- 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/0002-Document-PART-POLICY-lines.patch b/0000-Document-PART-POLICY-lines.patch similarity index 100% rename from 0002-Document-PART-POLICY-lines.patch rename to 0000-Document-PART-POLICY-lines.patch 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 b8a19815456a8dcce1896f7b546ec08f296e1c2c..0000000000000000000000000000000000000000 --- 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/0003-Grow-avoid-overflow-in-compute_backup_blocks.patch b/0001-Grow-avoid-overflow-in-compute_backup_blocks.patch similarity index 100% rename from 0003-Grow-avoid-overflow-in-compute_backup_blocks.patch rename to 0001-Grow-avoid-overflow-in-compute_backup_blocks.patch diff --git a/0004-Grow-report-correct-new-chunk-size.patch b/0002-Grow-report-correct-new-chunk-size.patch similarity index 100% rename from 0004-Grow-report-correct-new-chunk-size.patch rename to 0002-Grow-report-correct-new-chunk-size.patch diff --git a/0005-Fix-spelling-typos.patch b/0003-Fix-spelling-typos.patch similarity index 100% rename from 0005-Fix-spelling-typos.patch rename to 0003-Fix-spelling-typos.patch diff --git a/0006-Detail.c-do-not-skip-first-character-when-calling-xs.patch b/0004-Detail.c-do-not-skip-first-character-when-calling-xs.patch similarity index 100% rename from 0006-Detail.c-do-not-skip-first-character-when-calling-xs.patch rename to 0004-Detail.c-do-not-skip-first-character-when-calling-xs.patch diff --git a/0007-Fix-reshape-for-decreasing-data-offset.patch b/0005-Fix-reshape-for-decreasing-data-offset.patch similarity index 100% rename from 0007-Fix-reshape-for-decreasing-data-offset.patch rename to 0005-Fix-reshape-for-decreasing-data-offset.patch diff --git a/0008-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch b/0006-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch similarity index 100% rename from 0008-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch rename to 0006-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch diff --git a/0009-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch b/0007-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch similarity index 100% rename from 0009-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch rename to 0007-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch diff --git a/0010-Assemble-Fix-starting-array-with-initial-reshape-che.patch b/0008-Assemble-Fix-starting-array-with-initial-reshape-che.patch similarity index 100% rename from 0010-Assemble-Fix-starting-array-with-initial-reshape-che.patch rename to 0008-Assemble-Fix-starting-array-with-initial-reshape-che.patch diff --git a/0011-add-missing-units-to-examine.patch b/0009-add-missing-units-to-examine.patch similarity index 100% rename from 0011-add-missing-units-to-examine.patch rename to 0009-add-missing-units-to-examine.patch diff --git a/0012-Create-Block-rounding-size-to-max.patch b/0010-Create-Block-rounding-size-to-max.patch similarity index 100% rename from 0012-Create-Block-rounding-size-to-max.patch rename to 0010-Create-Block-rounding-size-to-max.patch diff --git a/0013-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch b/0011-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch similarity index 100% rename from 0013-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch rename to 0011-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch diff --git a/mdadm-4.1-rc2.tar.xz b/mdadm-4.1-rc2.tar.xz deleted file mode 100644 index 19bb1a0253f0ca2b4cccca27f6b84d9416ee46a3..0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..169dfc02fc7d1412813f76a19f16c7cafa6cb262 Binary files /dev/null and b/mdadm-4.1.tar.xz differ diff --git a/mdadm.spec b/mdadm.spec index efe7eeab88350ccc55b4135f10e8bda64f5d5f86..79bbb32f5471c2fd122d9ec3a9ff8fba6540847b 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,29 +1,27 @@ 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 -Patch5: 0005-Fix-spelling-typos.patch -Patch6: 0006-Detail.c-do-not-skip-first-character-when-calling-xs.patch -Patch7: 0007-Fix-reshape-for-decreasing-data-offset.patch -Patch8: 0008-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch -Patch9: 0009-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch -Patch10: 0010-Assemble-Fix-starting-array-with-initial-reshape-che.patch -Patch11: 0011-add-missing-units-to-examine.patch -Patch12: 0012-Create-Block-rounding-size-to-max.patch -Patch13: 0013-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch +Patch0: 0000-Document-PART-POLICY-lines.patch +Patch1: 0001-Grow-avoid-overflow-in-compute_backup_blocks.patch +Patch2: 0002-Grow-report-correct-new-chunk-size.patch +Patch3: 0003-Fix-spelling-typos.patch +Patch4: 0004-Detail.c-do-not-skip-first-character-when-calling-xs.patch +Patch5: 0005-Fix-reshape-for-decreasing-data-offset.patch +Patch6: 0006-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch +Patch7: 0007-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch +Patch8: 0008-Assemble-Fix-starting-array-with-initial-reshape-che.patch +Patch9: 0009-add-missing-units-to-examine.patch +Patch10: 0010-Create-Block-rounding-size-to-max.patch +Patch11: 0011-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch BuildRequires: systemd gcc binutils Requires(post): systemd coreutils @@ -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