DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH 2/2] eventdev: fix memory leakage when create thread fail
Date: Fri, 30 Apr 2021 17:34:38 +0800	[thread overview]
Message-ID: <1619775278-25857-3-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1619775278-25857-1-git-send-email-humin29@huawei.com>

From: Chengwen Feng <fengchengwen@huawei.com>

This patch fixes the issue that epoll_events memory is not released
after the intr thread created fail.

Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 lib/eventdev/rte_event_eth_rx_adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index d317e89..13dfb28 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1436,6 +1436,7 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)
 		return 0;
 
 	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d\n", err);
+	rte_free(rx_adapter->epoll_events);
 error:
 	rte_ring_free(rx_adapter->intr_ring);
 	rx_adapter->intr_ring = NULL;
-- 
2.7.4


  parent reply	other threads:[~2021-04-30  9:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30  9:34 [dpdk-dev] [PATCH 0/2] bugfix for lib eventdev Min Hu (Connor)
2021-04-30  9:34 ` [dpdk-dev] [PATCH 1/2] eventdev: remove redundant setting thread name Min Hu (Connor)
2021-05-01 12:38   ` Jerin Jacob
2021-04-30  9:34 ` Min Hu (Connor) [this message]
2021-05-01 12:38   ` [dpdk-dev] [PATCH 2/2] eventdev: fix memory leakage when create thread fail Jerin Jacob
2021-05-01 14:41     ` Jerin Jacob
2021-04-30 15:35 ` [dpdk-dev] [EXT] [PATCH 0/2] bugfix for lib eventdev Pavan Nikhilesh Bhagavatula

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=1619775278-25857-3-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.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).