diff --git a/0001-super1-Clear-memory-allocated-for-superblock-bitmap-.patch b/0001-super1-Clear-memory-allocated-for-superblock-bitmap-.patch new file mode 100644 index 0000000..d84bf69 --- /dev/null +++ b/0001-super1-Clear-memory-allocated-for-superblock-bitmap-.patch @@ -0,0 +1,31 @@ +From 1dcee1c9cbcf9592275914706b76b1931490092c Mon Sep 17 00:00:00 2001 +From: Jes Sorensen +Date: Wed, 6 Apr 2016 16:13:59 -0400 +Subject: [PATCH] super1: Clear memory allocated for superblock + bitmap before + use + +load_super1() did not clear memory allocated for the superblock + +bitmap. This causes issues if the superblock does not contain a bitmap +as later checks of bitmap features would rely on the bits being +cleared. + +This bug has been around for a long time, but was only exposed in +mdadm-3.4 with the introduction of the clustering code. + +Reported-by: Jan Stodola +Signed-off-by: Jes Sorensen +--- + super1.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/super1.c ++++ b/super1.c +@@ -2016,6 +2016,8 @@ static int load_super1(struct supertype + return 1; + } + ++ memset(super, 0, SUPER1_SIZE); ++ + if (aread(&afd, super, MAX_SB_SIZE) != MAX_SB_SIZE) { + if (devname) + pr_err("Cannot read superblock on %s\n", diff --git a/mdadm-3.3.4.tar.xz b/mdadm-3.3.4.tar.xz deleted file mode 100644 index 6d51491..0000000 --- a/mdadm-3.3.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68 -size 413396 diff --git a/mdadm-3.4.tar.xz b/mdadm-3.4.tar.xz new file mode 100644 index 0000000..7ca7dd4 --- /dev/null +++ b/mdadm-3.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808 +size 422704 diff --git a/mdadm.changes b/mdadm.changes index 9d4b121..a1e160f 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed May 4 04:56:42 UTC 2016 - neilb@suse.com + +- New upstream release mdadm-3.4 + Adds support for clustered-raid1 and journalled raid5 +- 0001-super1-Clear-memory-allocated-for-superblock-bitmap-.patch + Important upstream bugfix relating to uninialised memory. + ------------------------------------------------------------------- Thu Dec 10 17:07:40 CET 2015 - tiwai@suse.de diff --git a/mdadm.spec b/mdadm.spec index f182fea..73513e0 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ # # spec file for package mdadm # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: mdadm -Version: 3.3.4 +Version: 3.4 Release: 0 BuildRequires: binutils-devel BuildRequires: groff @@ -39,6 +39,7 @@ Source1: Software-RAID.HOWTO.tar.bz2 Source2: sysconfig.mdadm Source3: cron.d.mdadm Source7: mdadm.cron +Patch1: 0001-super1-Clear-memory-allocated-for-superblock-bitmap-.patch %define _udevdir %(pkg-config --variable=udevdir udev) %define _systemdshutdowndir %{_unitdir}/../system-shutdown @@ -50,6 +51,7 @@ programs but with a very different interface. %prep %setup -q -a1 +%patch1 -p1 %build make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes