mdadm/0102-Detail-fix-segfault-during-IMSM-raid-creation.patch
Neil Brown 52a13dbb79 Accepting request 860474 from home:colyli:branches:Base:System
- Incremental: Remove redundant spare movement logic
  (jsc#SLE-13700, bsc#1180220)
  0112-Incremental-Remove-redundant-spare-movement-logic.patch
- Dump: get stat from a wrong metadata file when restoring metadata
  (jsc#SLE-13700)
  0113-Dump-get-stat-from-a-wrong-metadata-file-when-restor.patch

OBS-URL: https://build.opensuse.org/request/show/860474
OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=193
2021-01-05 21:14:09 +00:00

38 lines
1.2 KiB
Diff

From c3129b39a7d467eec063681529f46f84a2a85308 Mon Sep 17 00:00:00 2001
From: Lidong Zhong <lidong.zhong@suse.com>
Date: Sun, 22 Nov 2020 23:12:29 +0800
Subject: [PATCH 08/17] Detail: fix segfault during IMSM raid creation
Git-commit: c3129b39a7d467eec063681529f46f84a2a85308
References: jsc#SLE-13700
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)
Signed-off-by: Coly Li <colyli@suse.de>
---
Detail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Detail.c b/Detail.c
index b6587c8..ea86884 100644
--- a/Detail.c
+++ b/Detail.c
@@ -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);
--
2.26.2