From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 764D4A0C4B for ; Tue, 31 Aug 2021 15:24:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 69DB540696; Tue, 31 Aug 2021 15:24:56 +0200 (CEST) Received: from mail-m971.mail.163.com (mail-m971.mail.163.com [123.126.97.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C6424013F; Tue, 31 Aug 2021 15:24:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=X85nl fAwYe8LUDiuXv+j192rR42gl3TNTJBPwklgAcw=; b=CcMRnm7TeKix1iqUxghiC 8jlTRzovgi2ukQrZyla0LOnLGUZDc4sdtEarfKhWIQGeNPMKxwkI9U4ofXKCotDb jFtRKnd0I+BZwJCJoFdyg+r6EL7KaXVqjZ0kzwr93Uubn4qN7vxM9dOwm42dWtvX sG6yrEXhVEmXvlf4Ahsgdg= Received: from localhost.localdomain (unknown [124.160.214.152]) by smtp1 (Coremail) with SMTP id GdxpCgA3xtqgLS5hrj4BAQ--.44640S2; Tue, 31 Aug 2021 21:24:50 +0800 (CST) From: Qiming Chen To: dev@dpdk.org Cc: haiyue.wang@intel.com, Qiming Chen , stable@dpdk.org Date: Tue, 31 Aug 2021 21:24:07 +0800 Message-Id: <20210831132407.7481-1-chenqiming_huawei@163.com> X-Mailer: git-send-email 2.30.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GdxpCgA3xtqgLS5hrj4BAQ--.44640S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Zr45AF1fAw48Zw4kAw18Zrb_yoW8JFykpF Z5GFy7AF1UXF4Iq3WkZa17ZFy3ua1vgF4jgrWIk34rG34UJr1293s3Wa40va1DtrW8ZF43 ZF4xtr4DGay3GaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jmrWwUUUUU= X-Originating-IP: [124.160.214.152] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/1tbiNgwAoFWBn+gcfAAAsZ Subject: [dpdk-stable] [PATCH] net/ixgbe: fix hash handle leak X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" In the ixgbe_fdir_filter_init and ixgbe_l2_tn_filter_init functions, after the hash handle is created, the handle is not released in subsequent abnormal branches. Fixes: 080e3c0ee989 ("net/ixgbe: store flow director filter") Fixes: d0c0c416ef1f ("net/ixgbe: store L2 tunnel filter") Cc: stable@dpdk.org Signed-off-by: Qiming Chen --- drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ccb01ed344..3fd3249150 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1393,6 +1393,7 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev) if (!fdir_info->hash_map) { PMD_INIT_LOG(ERR, "Failed to allocate memory for fdir hash map!"); + rte_hash_free(fdir_info->hash_handle); return -ENOMEM; } fdir_info->mask_added = FALSE; @@ -1429,6 +1430,7 @@ static int ixgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev) if (!l2_tn_info->hash_map) { PMD_INIT_LOG(ERR, "Failed to allocate memory for L2 TN hash map!"); + rte_hash_free(l2_tn_info->hash_handle); return -ENOMEM; } l2_tn_info->e_tag_en = FALSE; -- 2.30.1.windows.1