[dm-devel] [PATCH 14/16] multipathd: fix segfault in cli_list_map_fmt()

mwilck at suse.com mwilck at suse.com
Thu Sep 1 16:09:50 UTC 2022


From: Martin Wilck <mwilck at suse.com>

get_multipath_layout() must be passed an mpvec, not a pathvec.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 multipathd/cli_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index db4d441..3d39967 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -420,7 +420,7 @@ cli_list_map_fmt (void *v, struct strbuf *reply, void *data)
 
 	if ((width = alloc_multipath_layout()) == NULL)
 		return 1;
-	get_multipath_layout(vecs->pathvec, 1, width);
+	get_multipath_layout(vecs->mpvec, 1, width);
 	param = convert_dev(param, 0);
 	mpp = find_mp_by_str(vecs->mpvec, param);
 	if (!mpp)
-- 
2.37.1



More information about the dm-devel mailing list