From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id F3C8C1B488 for ; Thu, 22 Nov 2018 17:52:07 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C7F8234; Thu, 22 Nov 2018 16:52:07 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CEC060E3F; Thu, 22 Nov 2018 16:52:05 +0000 (UTC) From: Kevin Traynor To: Paul Luse Cc: Anatoly Burakov , Ferruh Yigit , dpdk stable Date: Thu, 22 Nov 2018 16:49:17 +0000 Message-Id: <20181122164957.13003-25-ktraynor@redhat.com> In-Reply-To: <20181122164957.13003-1-ktraynor@redhat.com> References: <20181122164957.13003-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 22 Nov 2018 16:52:07 +0000 (UTC) Subject: [dpdk-stable] patch 'bus/vdev: fix multi-process IPC buffer leak on scan' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 16:52:08 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/28/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 88aa5129d0f25ce304affb506db3b7b9f29aac04 Mon Sep 17 00:00:00 2001 From: Paul Luse Date: Fri, 21 Sep 2018 12:25:57 -0400 Subject: [PATCH] bus/vdev: fix multi-process IPC buffer leak on scan [ upstream commit 66fd3a3b0f5be39ba30a2d6aa617604c8d221230 ] This patch fixes an issue caught with ASAN where a vdev_scan() to a secondary bus was failing to free some memory. The doxygen comment in EAL is fixed at the same time. Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel") Fixes: 783b6e54971d ("eal: add synchronous multi-process communication") Signed-off-by: Paul Luse Acked-by: Anatoly Burakov Acked-by: Ferruh Yigit --- drivers/bus/vdev/vdev.c | 1 + lib/librte_eal/common/include/rte_eal.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 69dee89a8..2566d6c0d 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -424,4 +424,5 @@ vdev_scan(void) resp = (struct vdev_param *)mp_rep->param; VDEV_LOG(INFO, "Received %d vdevs", resp->num); + free(mp_reply.msgs); } else VDEV_LOG(ERR, "Failed to request vdev from primary"); diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index e114dcbdc..71a8518cc 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -317,5 +317,5 @@ rte_mp_sendmsg(struct rte_mp_msg *msg); * @param reply * The reply argument will be for storing all the replied messages; - * the caller is responsible for free reply->replies. + * the caller is responsible for free reply->msgs. * * @param ts -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:32.916091650 +0000 +++ 0025-bus-vdev-fix-multi-process-IPC-buffer-leak-on-scan.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,8 +1,10 @@ -From 66fd3a3b0f5be39ba30a2d6aa617604c8d221230 Mon Sep 17 00:00:00 2001 +From 88aa5129d0f25ce304affb506db3b7b9f29aac04 Mon Sep 17 00:00:00 2001 From: Paul Luse Date: Fri, 21 Sep 2018 12:25:57 -0400 Subject: [PATCH] bus/vdev: fix multi-process IPC buffer leak on scan +[ upstream commit 66fd3a3b0f5be39ba30a2d6aa617604c8d221230 ] + This patch fixes an issue caught with ASAN where a vdev_scan() to a secondary bus was failing to free some memory. @@ -10,7 +12,6 @@ Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel") Fixes: 783b6e54971d ("eal: add synchronous multi-process communication") -Cc: stable@dpdk.org Signed-off-by: Paul Luse Acked-by: Anatoly Burakov @@ -21,17 +22,17 @@ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c -index 688e31c21..685cc4e78 100644 +index 69dee89a8..2566d6c0d 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c -@@ -426,4 +426,5 @@ vdev_scan(void) +@@ -424,4 +424,5 @@ vdev_scan(void) resp = (struct vdev_param *)mp_rep->param; VDEV_LOG(INFO, "Received %d vdevs", resp->num); + free(mp_reply.msgs); } else VDEV_LOG(ERR, "Failed to request vdev from primary"); diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h -index 3ee897c1d..6514a9fe6 100644 +index e114dcbdc..71a8518cc 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -317,5 +317,5 @@ rte_mp_sendmsg(struct rte_mp_msg *msg);