2010-06-28 11:44:27 +02:00
|
|
|
From c4dc5c0aa7aa412bf85f0f6d646ea0c307eb4591 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Michal Marek <mmarek@suse.cz>
|
|
|
|
Date: Fri, 19 Mar 2010 11:59:20 +0100
|
|
|
|
Subject: [PATCH] mdmon: Fix crash if /proc/mdstat lists 0.9 superblocks
|
|
|
|
|
|
|
|
Signed-off-by: Michal Marek <mmarek@suse.cz>
|
2010-10-22 16:13:36 +02:00
|
|
|
================================================================================
|
|
|
|
--- mdadm-3.1.4/mdmon.c
|
|
|
|
+++ mdadm-3.1.4/mdmon.c
|
|
|
|
@@ -300,7 +300,8 @@
|
|
|
|
/* launch an mdmon instance for each container found */
|
2010-06-28 11:44:27 +02:00
|
|
|
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
|