[mdadm/f14] Fix an issue with mdmon takeover segfaulting

Doug Ledford dledford at fedoraproject.org
Fri Jul 15 00:04:36 UTC 2011


commit 85d2923ef18238843fe56219dd4c068c1da1f23d
Author: Doug Ledford <dledford at redhat.com>
Date:   Thu Jul 14 20:03:40 2011 -0400

    Fix an issue with mdmon takeover segfaulting
    
    Fixes bz653207

 mdadm-3.1.3-bz653207.patch |   12 ++++++++++++
 mdadm.spec                 |    9 ++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/mdadm-3.1.3-bz653207.patch b/mdadm-3.1.3-bz653207.patch
new file mode 100644
index 0000000..f3dea78
--- /dev/null
+++ b/mdadm-3.1.3-bz653207.patch
@@ -0,0 +1,12 @@
+--- mdadm-3.1.3-git20100804/mdmon.c.segfault	2011-07-14 19:46:20.210228956 -0400
++++ mdadm-3.1.3-git20100804/mdmon.c	2011-07-14 19:46:43.967047709 -0400
+@@ -300,7 +300,8 @@ int main(int argc, char *argv[])
+ 		/* launch an mdmon instance for each container found */
+ 		mdstat = mdstat_read(0, 0);
+ 		for (e = mdstat; e; e = e->next) {
+-			if (strncmp(e->metadata_version, "external:", 9) == 0 &&
++			if (e->metadata_version &&
++			    strncmp(e->metadata_version, "external:", 9) == 0 &&
+ 			    !is_subarray(&e->metadata_version[9])) {
+ 				devname = devnum2devname(e->devnum);
+ 				/* update cmdline so this mdmon instance can be
diff --git a/mdadm.spec b/mdadm.spec
index 484438f..e07bbac 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -1,12 +1,13 @@
 Summary:     The mdadm program controls Linux md devices (software RAID arrays)
 Name:        mdadm
 Version:     3.1.3
-Release:     0.git20100804.2%{?dist}
+Release:     0.git20100804.3%{?dist}
 Source:      http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-git20100804.tar.bz2
 Source1:     mdmonitor.init
 Source2:     raid-check
 Source3:     mdadm.rules
 Source4:     mdadm-raid-check-sysconfig
+Patch0:      mdadm-3.1.3-bz653207.patch
 Patch19:     mdadm-3.1.3-udev.patch
 Patch20:     mdadm-2.5.2-static.patch
 URL:         http://www.kernel.org/pub/linux/utils/raid/mdadm/
@@ -28,6 +29,7 @@ file can be used to help with some common tasks.
 
 %prep
 %setup -q -n mdadm-3.1.3-git20100804
+%patch0 -p1 -b .bz653207
 %patch19 -p1 -b .udev
 %patch20 -p1 -b .static
 
@@ -74,6 +76,11 @@ fi
 %attr(0700,root,root) %dir /var/run/mdadm
 
 %changelog
+* Thu Jul 14 2011 Doug Ledford <dledford at redhat.com> - 3.1.3-0.git20100804.3
+- Fix for segfault when evaluating whether or not to takeover version 0.90
+  arrays
+- Resolves: bz653207
+
 * Wed Aug 04 2010 Doug Ledford <dledford at redhat.com> - 3.1.3-0.git20100804.2
 - Add udev patch to not have incremental assembly in two rules files
 


More information about the scm-commits mailing list