From patchwork Thu Sep 1 16:09:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962854 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DE96ECAAD3 for ; Thu, 1 Sep 2022 16:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=c7W2uFQUVmPnsfa49Mcfpja3ra70Crahx8Ae3teGbIQ=; b=UdSmAsAUdivwC1xARi7BYPflZ0zExLAa0hYzQ9ifoSju7k5tAGT+9jVG0aw5SYcKLA3rca ddRshEunKgeMHZEB3ab/4XW8GDmnQWHXSA4aJtX5AnXSSBH+m4cG0vCRq9cJ2Tmm++uJzD DE2W/LSZLv4ON1tO8RlK6Og8Mv/0VJY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-A6Qiyru8OJ-t6-neme_-zg-1; Thu, 01 Sep 2022 12:10:24 -0400 X-MC-Unique: A6Qiyru8OJ-t6-neme_-zg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AC56185A589; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A0B42166B26; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8A4141943214; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9EB53194B977 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9241A2026D4C; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8DFF92026D64 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73C428039AE for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-312-caVKIcuAMn2M3KFW-n0uOg-1; Thu, 01 Sep 2022 12:10:11 -0400 X-MC-Unique: caVKIcuAMn2M3KFW-n0uOg-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B9DD822B39; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 822BF13A79; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CM9GHmHZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:09 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:50 +0200 Message-Id: <20220901160952.2167-15-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Subject: [dm-devel] [PATCH 14/16] multipathd: fix segfault in cli_list_map_fmt() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck get_multipath_layout() must be passed an mpvec, not a pathvec. Signed-off-by: Martin Wilck --- 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)