[PATCH 20.11 V2 2/2] net/hns3: fix interrupt vector freeing

Huisong Li lihuisong at huawei.com
Sat Nov 13 10:17:53 CET 2021


From: Chengwen Feng <fengchengwen at huawei.com>

[ 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 <fengchengwen at huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 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



More information about the stable mailing list