From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7B93C2BA2B for ; Thu, 9 Apr 2020 01:59:16 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 1417720857 for ; Thu, 9 Apr 2020 01:59:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1417720857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 165801C134; Thu, 9 Apr 2020 03:59:15 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 387901C11F; Thu, 9 Apr 2020 03:59:13 +0200 (CEST) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 87C702FF11244351A3E8; Thu, 9 Apr 2020 09:59:11 +0800 (CST) Received: from localhost (10.173.251.152) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Apr 2020 09:59:01 +0800 From: wangyunjian To: CC: , , , , , Yunjian Wang , Date: Thu, 9 Apr 2020 09:59:00 +0800 Message-ID: <1586397540-19668-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.173.251.152] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address 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" From: Yunjian Wang The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(), so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and will cause double free. Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions") CC: stable@dpdk.org Signed-off-by: Yunjian Wang --- v2: * remove 'rte_free(dev->data->mac_addrs);' suggested by Ferruh Yigit * update commit log --- drivers/net/pfe/pfe_ethdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 940347819..383be4397 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -396,7 +396,6 @@ pfe_eth_exit(struct rte_eth_dev *dev, struct pfe *pfe) /* Close the device file for link status */ pfe_eth_close_cdev(dev->data->dev_private); - rte_free(dev->data->mac_addrs); rte_eth_dev_release_port(dev); pfe->nb_devs--; } -- 2.19.1