patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Huisong Li <lihuisong@huawei.com>
To: <stable@dpdk.org>, <xuemingl@nvidia.com>
Cc: <lihuisong@huawei.com>, <fengchengwen@huawei.com>
Subject: [PATCH 20.11 V2 2/2] net/hns3: fix interrupt vector freeing
Date: Sat, 13 Nov 2021 17:17:53 +0800	[thread overview]
Message-ID: <20211113091753.31708-3-lihuisong@huawei.com> (raw)
In-Reply-To: <20211113091753.31708-1-lihuisong@huawei.com>

From: Chengwen Feng <fengchengwen@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@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@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


  parent reply	other threads:[~2021-11-13  9:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13  8:34 [PATCH V1 0/2] net/hns3: backport two patches to 20.11.4 Huisong Li
2021-11-13  8:34 ` [PATCH V1 1/2] net/hns3: fix residual MAC after setting default MAC Huisong Li
2021-11-13  8:34 ` [PATCH V1 2/2] net/hns3: fix interrupt vector freeing Huisong Li
2021-11-13  9:02 ` [PATCH V1 0/2][20.11] net/hns3: backport two patches to 20.11.4 Xueming(Steven) Li
2021-11-13  9:17 ` [PATCH 20.11 V2 0/2] " Huisong Li
2021-11-13  9:17   ` [PATCH 20.11 V2 1/2] net/hns3: fix residual MAC after setting default MAC Huisong Li
2021-11-27 13:55     ` Xueming(Steven) Li
2021-12-06  6:11       ` lihuisong (C)
2021-11-13  9:17   ` Huisong Li [this message]
2021-11-27 13:56     ` [PATCH 20.11 V2 2/2] net/hns3: fix interrupt vector freeing Xueming(Steven) Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211113091753.31708-3-lihuisong@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=fengchengwen@huawei.com \
    --cc=stable@dpdk.org \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).