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 C4F14A0C4B for ; Sat, 13 Nov 2021 10:22:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F4E9410F6; Sat, 13 Nov 2021 10:22:27 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id DC5614013F for ; Sat, 13 Nov 2021 10:22:25 +0100 (CET) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Hrqbv2kzRzcb6w; Sat, 13 Nov 2021 17:17:31 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Sat, 13 Nov 2021 17:22:23 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Sat, 13 Nov 2021 17:22:22 +0800 From: Huisong Li To: , CC: , Subject: [PATCH 20.11 V2 2/2] net/hns3: fix interrupt vector freeing Date: Sat, 13 Nov 2021 17:17:53 +0800 Message-ID: <20211113091753.31708-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211113091753.31708-1-lihuisong@huawei.com> References: <20211113083412.20894-1-lihuisong@huawei.com> <20211113091753.31708-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected 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 From: Chengwen Feng [ upstream commit f93819cf5abc047905c464fe4abf84fa823239dd ] The intr_handle->intr_vec is allocated by rte_zmalloc(), but freed by free(), this patch fixes it. Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt") Signed-off-by: Chengwen Feng Reviewed-by: Ferruh Yigit --- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 086828180b..b4a1ec0c7c 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2159,7 +2159,7 @@ hns3vf_map_rx_interrupt(struct rte_eth_dev *dev) vf_bind_vector_error: rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec) { - free(intr_handle->intr_vec); + rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } return ret; -- 2.33.0