Blame SOURCES/mdadm-3.2.6-IMSM-don-t-crash-when-creating-an-array-with-missing.patch
|
 |
fc6001 |
From 1ca5c8e0c74946f4fcd74e97c5f48fba482d9596 Mon Sep 17 00:00:00 2001
|
|
 |
fc6001 |
From: NeilBrown <neilb@suse.de>
|
|
 |
fc6001 |
Date: Tue, 21 Jan 2014 09:40:02 +1100
|
|
 |
fc6001 |
Subject: [PATCH] IMSM: don't crash when creating an array with missing
|
|
 |
fc6001 |
devices.
|
|
 |
fc6001 |
|
|
 |
fc6001 |
'missing' devices are in a different list so when collection the
|
|
 |
fc6001 |
serial numbers of all devices we need to check both lists.
|
|
 |
fc6001 |
|
|
 |
fc6001 |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
 |
fc6001 |
---
|
|
 |
fc6001 |
super-intel.c | 2 ++
|
|
 |
fc6001 |
1 file changed, 2 insertions(+)
|
|
 |
fc6001 |
|
|
 |
fc6001 |
diff --git a/super-intel.c b/super-intel.c
|
|
 |
fc6001 |
index c103ffd..f0a7ab5 100644
|
|
 |
fc6001 |
--- a/super-intel.c
|
|
 |
fc6001 |
+++ b/super-intel.c
|
|
 |
fc6001 |
@@ -5210,6 +5210,8 @@ static int create_array(struct supertype *st, int dev_idx)
|
|
 |
fc6001 |
int idx = get_imsm_disk_idx(dev, i, MAP_X);
|
|
 |
fc6001 |
|
|
 |
fc6001 |
disk = get_imsm_disk(super, idx);
|
|
 |
fc6001 |
+ if (!disk)
|
|
 |
fc6001 |
+ disk = get_imsm_missing(super, idx);
|
|
 |
fc6001 |
serialcpy(inf[i].serial, disk->serial);
|
|
 |
fc6001 |
}
|
|
 |
fc6001 |
append_metadata_update(st, u, len);
|
|
 |
fc6001 |
--
|
|
 |
fc6001 |
1.8.5.3
|
|
 |
fc6001 |
|