From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14990A04BC for ; Thu, 8 Oct 2020 06:47:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F01A01B650; Thu, 8 Oct 2020 06:47:04 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E41961B650; Thu, 8 Oct 2020 06:47:01 +0200 (CEST) IronPort-SDR: +rBKxLR2m+TY92yN9mFxeyHsTwcAjDW28eRe+IhV5JV1fWGCqWxyLf5ce3nKWG+RfNsuesDxGy 0olYfe0L2uTg== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="249961246" X-IronPort-AV: E=Sophos;i="5.77,349,1596524400"; d="scan'208";a="249961246" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2020 21:47:00 -0700 IronPort-SDR: FI0/hh3z+aa2iVZ7M/2jt8dMbe79sMsFB7d2zmQzk+0Ekk3NeEs/7SLuBly5m3bfU4uYAWRgPM eYHD9cwdxDeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,349,1596524400"; d="scan'208";a="344607036" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga008.jf.intel.com with ESMTP; 07 Oct 2020 21:47:00 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 7 Oct 2020 21:46:59 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 8 Oct 2020 12:46:58 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Thu, 8 Oct 2020 12:46:58 +0800 From: "Zhang, Qi Z" To: "Wang, Xiao W" , wangyunjian , "dev@dpdk.org" CC: "jerry.lilijun@huawei.com" , "xudingke@huawei.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh check fails Thread-Index: AQHWnHyz9c+ISsxrUUy9l1nXLnVViKmMaKIAgAC6bMA= Date: Thu, 8 Oct 2020 04:46:58 +0000 Message-ID: <9e07a2d5dcf44a978f15ef21ef0231a8@intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.108.32.68] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh check fails 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Wang, Xiao W > Sent: Thursday, October 8, 2020 9:39 AM > To: wangyunjian ; dev@dpdk.org > Cc: Zhang, Qi Z ; jerry.lilijun@huawei.com; > xudingke@huawei.com; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh > check fails >=20 > Hi, >=20 > Thanks for the patch. >=20 > > -----Original Message----- > > From: wangyunjian > > Sent: Wednesday, October 7, 2020 3:37 PM > > To: dev@dpdk.org > > Cc: Zhang, Qi Z ; Wang, Xiao W > > ; jerry.lilijun@huawei.com; > > xudingke@huawei.com; Yunjian Wang ; > > stable@dpdk.org > > Subject: [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh > > check fails > > > > From: Yunjian Wang > > > > In fm10k_tx_queue_setup(), we allocate memory for the queue structure > > but not released when Tx thresh check fails. > > > > Fixes: 98068e0e044e ("fm10k: add Tx queue setup/release") > > Cc: stable@dpdk.org > > > > Signed-off-by: Yunjian Wang > > --- > > drivers/net/fm10k/fm10k_ethdev.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > > b/drivers/net/fm10k/fm10k_ethdev.c > > index 309637071..c4a6fdf7f 100644 > > --- a/drivers/net/fm10k/fm10k_ethdev.c > > +++ b/drivers/net/fm10k/fm10k_ethdev.c > > @@ -2024,8 +2024,10 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, > > uint16_t queue_id, q->ops =3D &def_txq_ops; q->tail_ptr =3D (volatile > > uint32_t *) &((uint32_t *)hw->hw_addr)[FM10K_TDT(queue_id)]; > > -if (handle_txconf(q, conf)) > > +if (handle_txconf(q, conf)) { > > +rte_free(q); > > return -EINVAL; > > +} > > > > /* allocate memory for the software ring */ q->sw_ring =3D > > rte_zmalloc_socket("fm10k sw ring", > > -- > > 2.23.0 >=20 > Acked-by: Xiao Wang Applied to dpdk-next-net-intel. Thanks Qi >=20