* [PATCH] Detail: fix segfault during IMSM raid creation
@ 2020-11-22 15:12 Lidong Zhong
2020-11-25 23:05 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Lidong Zhong @ 2020-11-22 15:12 UTC (permalink / raw)
To: jes, linux-raid; +Cc: Tkaczyk Mariusz
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)
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Detail: fix segfault during IMSM raid creation
2020-11-22 15:12 [PATCH] Detail: fix segfault during IMSM raid creation Lidong Zhong
@ 2020-11-25 23:05 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2020-11-25 23:05 UTC (permalink / raw)
To: Lidong Zhong, linux-raid; +Cc: Tkaczyk Mariusz
On 11/22/20 10:12 AM, Lidong Zhong wrote:
> 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)
> ---
> Detail.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied!
Thanks,
Jes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-25 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-22 15:12 [PATCH] Detail: fix segfault during IMSM raid creation Lidong Zhong
2020-11-25 23:05 ` Jes Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).