From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F03E51B5B3; Thu, 25 Apr 2019 14:47:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2019 05:47:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,393,1549958400"; d="scan'208";a="145632813" Received: from silpixa00399499.ir.intel.com (HELO silpixa00399499.ger.corp.intel.com) ([10.237.222.133]) by orsmga003.jf.intel.com with ESMTP; 25 Apr 2019 05:47:54 -0700 From: Herakliusz Lipiec To: Keith Wiles Cc: dev@dpdk.org, anatoly.burakov@intel.com, Herakliusz Lipiec , rasland@mellanox.com, stable@dpdk.org Date: Thu, 25 Apr 2019 13:48:17 +0100 Message-Id: <20190425124817.28409-3-herakliusz.lipiec@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190425124817.28409-1-herakliusz.lipiec@intel.com> References: <20190425114324.611-1-herakliusz.lipiec@intel.com> <20190425124817.28409-1-herakliusz.lipiec@intel.com> Subject: [dpdk-dev] [PATCH v4 2/2] ipc: fix tap pmd memleak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Apr 2019 12:47:58 -0000 When sending synchronous IPC requests, the caller must free the response buffer if the request was successful and reply is no longer needed. Fix the code to correctly use the IPC API. Bugzilla ID: 228 Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary") Cc: rasland@mellanox.com Cc: stable@dpdk.org Signed-off-by: Herakliusz Lipiec --- drivers/net/tap/rte_eth_tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 7f74b5dc9..f8a4169c5 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2118,7 +2118,7 @@ tap_mp_attach_queues(const char *port_name, struct rte_eth_dev *dev) process_private->rxq_fds[queue] = reply->fds[fd_iterator++]; for (queue = 0; queue < reply_param->txq_count; queue++) process_private->txq_fds[queue] = reply->fds[fd_iterator++]; - + free(reply); return 0; } -- 2.17.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A8515A05D3 for ; Thu, 25 Apr 2019 14:48:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0EFCE1B5C1; Thu, 25 Apr 2019 14:47:59 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F03E51B5B3; Thu, 25 Apr 2019 14:47:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2019 05:47:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,393,1549958400"; d="scan'208";a="145632813" Received: from silpixa00399499.ir.intel.com (HELO silpixa00399499.ger.corp.intel.com) ([10.237.222.133]) by orsmga003.jf.intel.com with ESMTP; 25 Apr 2019 05:47:54 -0700 From: Herakliusz Lipiec To: Keith Wiles Cc: dev@dpdk.org, anatoly.burakov@intel.com, Herakliusz Lipiec , rasland@mellanox.com, stable@dpdk.org Date: Thu, 25 Apr 2019 13:48:17 +0100 Message-Id: <20190425124817.28409-3-herakliusz.lipiec@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190425124817.28409-1-herakliusz.lipiec@intel.com> References: <20190425114324.611-1-herakliusz.lipiec@intel.com> <20190425124817.28409-1-herakliusz.lipiec@intel.com> Subject: [dpdk-dev] [PATCH v4 2/2] ipc: fix tap pmd memleak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190425124817.S0BaPzrLV61VwQFevKAFtwNEXDcto0IX9DljOKpSmQc@z> When sending synchronous IPC requests, the caller must free the response buffer if the request was successful and reply is no longer needed. Fix the code to correctly use the IPC API. Bugzilla ID: 228 Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary") Cc: rasland@mellanox.com Cc: stable@dpdk.org Signed-off-by: Herakliusz Lipiec --- drivers/net/tap/rte_eth_tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 7f74b5dc9..f8a4169c5 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2118,7 +2118,7 @@ tap_mp_attach_queues(const char *port_name, struct rte_eth_dev *dev) process_private->rxq_fds[queue] = reply->fds[fd_iterator++]; for (queue = 0; queue < reply_param->txq_count; queue++) process_private->txq_fds[queue] = reply->fds[fd_iterator++]; - + free(reply); return 0; } -- 2.17.2