Skip to content

Commit 1ca5c8e

Browse files
committed
IMSM: don't crash when creating an array with missing devices.
'missing' devices are in a different list so when collection the serial numbers of all devices we need to check both lists. Signed-off-by: NeilBrown <[email protected]>
1 parent 5e7be83 commit 1ca5c8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

super-intel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5210,6 +5210,8 @@ static int create_array(struct supertype *st, int dev_idx)
52105210
int idx = get_imsm_disk_idx(dev, i, MAP_X);
52115211

52125212
disk = get_imsm_disk(super, idx);
5213+
if (!disk)
5214+
disk = get_imsm_missing(super, idx);
52135215
serialcpy(inf[i].serial, disk->serial);
52145216
}
52155217
append_metadata_update(st, u, len);

0 commit comments

Comments
 (0)