diff options
author | Michal Marek <mmarek@suse.cz> | 2011-05-17 03:08:16 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-05-17 03:08:16 +0200 |
commit | f4db7a6f3c3b9a0701f3063b287b7cb59ccecd07 (patch) | |
tree | 7ffa93bf1824c424d21c0d429c97542d37e3e1aa /mdmon.c | |
parent | RAID-6 check standalone suspend array (diff) | |
download | mdadm-f4db7a6f3c3b9a0701f3063b287b7cb59ccecd07.tar.xz mdadm-f4db7a6f3c3b9a0701f3063b287b7cb59ccecd07.zip |
mdmon: Fix crash if /proc/mdstat lists 0.9 superblocks
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'mdmon.c')
-rw-r--r-- | mdmon.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |