From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8CD87558A for ; Tue, 15 Nov 2016 12:39:55 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP; 15 Nov 2016 03:39:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,494,1473145200"; d="scan'208";a="31499469" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga006.fm.intel.com with ESMTP; 15 Nov 2016 03:39:54 -0800 From: Yuanhan Liu To: Nipun Gupta Cc: Yuanhan Liu , Olivier Matz , dpdk stable Date: Tue, 15 Nov 2016 19:40:32 +0800 Message-Id: <1479210033-24775-12-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1479210033-24775-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1479210033-24775-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'mempool: fix leak if populate fails' has been queued to stable release 16.07.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 11:39:55 -0000 Hi, FYI, your patch has been queued to stable release 16.07.2 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/19/16. So please shout if anyone has objections. Thanks. --yliu --- >>From c74cc134159f5d3b4e057cf768a4a7887ead645f Mon Sep 17 00:00:00 2001 From: Nipun Gupta Date: Fri, 11 Nov 2016 21:17:10 +0530 Subject: [PATCH] mempool: fix leak if populate fails [ upstream commit f5e9ed5c4e35a4cc2db7c10cf855e701472af864 ] This patch fixes the issue of memzone not being freed incase the rte_mempool_populate_phys fails in the rte_mempool_populate_default This issue was identified when testing with OVS ~2.6 - configure the system with low memory (e.g. < 500 MB) - add bridge and dpdk interfaces - delete brigde - keep on repeating the above sequence. Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default") Signed-off-by: Nipun Gupta Acked-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 411a332..ad7c470 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -579,8 +579,10 @@ rte_mempool_populate_default(struct rte_mempool *mp) mz->len, pg_sz, rte_mempool_memchunk_mz_free, (void *)(uintptr_t)mz); - if (ret < 0) + if (ret < 0) { + rte_memzone_free(mz); goto fail; + } } return mp->size; -- 1.9.0