Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mdadm for openSUSE:Factory checked in at 2023-05-28 19:21:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mdadm (Old) and /work/SRC/openSUSE:Factory/.mdadm.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mdadm" Sun May 28 19:21:20 2023 rev:143 rq:1089072 version:4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/mdadm/mdadm.changes 2023-04-28 16:22:07.909577187 +0200 +++ /work/SRC/openSUSE:Factory/.mdadm.new.1533/mdadm.changes 2023-05-28 19:21:21.840434141 +0200 @@ -1,0 +2,12 @@ +Fri May 26 02:29:42 UTC 2023 - Coly Li <[email protected]> + +- Grow: fix possible memory leak (bsc#1208618) + 0060-Grow-fix-possible-memory-leak.patch +- Grow: fix can't change bitmap type from none to clustered + (bsc#1208618) + 0061-Grow-fix-can-t-change-bitmap-type-from-none-to-clustered.patch +- Use source code mdadm-4.2.tar.xz from kernel.org version for + checksum + - mdadm-4.2.tar.xz + +------------------------------------------------------------------- New: ---- 0060-Grow-fix-possible-memory-leak.patch 0061-Grow-fix-can-t-change-bitmap-type-from-none-to-clustered.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mdadm.spec ++++++ --- /var/tmp/diff_new_pack.o6uk6t/_old 2023-05-28 19:21:22.776439712 +0200 +++ /var/tmp/diff_new_pack.o6uk6t/_new 2023-05-28 19:21:22.780439736 +0200 @@ -100,6 +100,8 @@ Patch57: 0057-mdmon-Improve-switchroot-interactions.patch Patch58: 0058-mdopen-always-try-create_named_array.patch Patch59: 0059-Improvements-for-IMSM_NO_PLATFORM-testing.patch +Patch60: 0060-Grow-fix-possible-memory-leak.patch +Patch61: 0061-Grow-fix-can-t-change-bitmap-type-from-none-to-clustered.patch Patch1001: 1001-display-timeout-status.patch Patch1002: 1002-OnCalendar-format-fix-of-mdcheck_start-timer.patch Patch1003: 1003-mdadm-treat-the-Dell-softraid-array-as-local-array.patch @@ -171,6 +173,8 @@ %patch57 -p1 %patch58 -p1 %patch59 -p1 +%patch60 -p1 +%patch61 -p1 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 ++++++ 0060-Grow-fix-possible-memory-leak.patch ++++++ >From 434b3b9bb96a76dc12f693b64cf23b581781e20b Mon Sep 17 00:00:00 2001 From: Blazej Kucman <[email protected]> Date: Tue, 20 Dec 2022 12:07:51 +0100 Subject: [PATCH] Grow: fix possible memory leak. Git-commit: 434b3b9bb96a76dc12f693b64cf23b581781e20b Patch-mainline: mdadm-4.2+ References: bsc#1208618 Signed-off-by: Blazej Kucman <[email protected]> Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Coly Li <[email protected]> --- Grow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Grow.c b/Grow.c index e362403..b73ec2a 100644 --- a/Grow.c +++ b/Grow.c @@ -432,6 +432,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s) if (((disk.state & (1 << MD_DISK_WRITEMOSTLY)) == 0) && (strcmp(s->bitmap_file, "clustered") == 0)) { pr_err("%s disks marked write-mostly are not supported with clustered bitmap\n",devname); + free(mdi); return 1; } fd2 = dev_open(dv, O_RDWR); @@ -453,8 +454,10 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s) pr_err("failed to load super-block.\n"); } close(fd2); - if (rv) + if (rv) { + free(mdi); return 1; + } } if (offset_setable) { st->ss->getinfo_super(st, mdi, NULL); -- 2.35.3 ++++++ 0061-Grow-fix-can-t-change-bitmap-type-from-none-to-clustered.patch ++++++ >From d07e561810a2e33b667a8a9476edaff42eb119b9 Mon Sep 17 00:00:00 2001 From: Heming Zhao <[email protected]> Date: Thu, 23 Feb 2023 22:39:39 +0800 Subject: [PATCH] Grow: fix can't change bitmap type from none to clustered. Git-commit: d07e561810a2e33b667a8a9476edaff42eb119b9 Patch-mainline: mdadm-4.2+ References: bsc#1208618 Commit a042210648ed ("disallow create or grow clustered bitmap with writemostly set") introduced this bug. We should use 'true' logic not '== 0' to deny setting up clustered array under WRITEMOSTLY condition. How to trigger ``` ~/mdadm # ./mdadm -Ss && ./mdadm --zero-superblock /dev/sd{a,b} ~/mdadm # ./mdadm -C /dev/md0 -l mirror -b clustered -e 1.2 -n 2 \ /dev/sda /dev/sdb --assume-clean mdadm: array /dev/md0 started. ~/mdadm # ./mdadm --grow /dev/md0 --bitmap=none ~/mdadm # ./mdadm --grow /dev/md0 --bitmap=clustered mdadm: /dev/md0 disks marked write-mostly are not supported with clustered bitmap ``` Signed-off-by: Heming Zhao <[email protected]> Acked-by: Coly Li <[email protected]> Signed-off-by: Jes Sorensen <[email protected]> --- Grow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grow.c b/Grow.c index 8f5cf07..bb5fe45 100644 --- a/Grow.c +++ b/Grow.c @@ -429,7 +429,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s) dv = map_dev(disk.major, disk.minor, 1); if (!dv) continue; - if (((disk.state & (1 << MD_DISK_WRITEMOSTLY)) == 0) && + if ((disk.state & (1 << MD_DISK_WRITEMOSTLY)) && (strcmp(s->bitmap_file, "clustered") == 0)) { pr_err("%s disks marked write-mostly are not supported with clustered bitmap\n",devname); free(mdi); -- 2.35.3 ++++++ mdadm-4.2.tar.xz ++++++
