diff options
author | Lidong Zhong <lidong.zhong@suse.com> | 2020-11-22 16:12:29 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2020-11-26 00:05:05 +0100 |
commit | c3129b39a7d467eec063681529f46f84a2a85308 (patch) | |
tree | 43a5d62023f8a36687041c47f6e7003ff0500418 /Detail.c | |
parent | Super1: allow RAID0 layout setting to be removed. (diff) | |
download | mdadm-c3129b39a7d467eec063681529f46f84a2a85308.tar.xz mdadm-c3129b39a7d467eec063681529f46f84a2a85308.zip |
Detail: fix segfault during IMSM raid creation
It can be reproduced with non IMSM hardware and IMSM_NO_PLATFORM
environmental variable set. The array state is inactive when creating
an IMSM container. And the structure info is NULL because load_super()
always fails since no intel HBA information could be obtained.
Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
Reported-by: Tkaczyk Mariusz <mariusz.tkaczyk@intel.com>
Fixes: 64bf4dff3430 (Detail: show correct raid level when the array is inactive)
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -224,7 +224,7 @@ int Detail(char *dev, struct context *c) } /* Ok, we have some info to print... */ - if (inactive) + if (inactive && info) str = map_num(pers, info->array.level); else str = map_num(pers, array.level); |