DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 3/8] common/cnxk: fix double free of flow aging resources
Date: Wed, 23 Oct 2024 20:31:37 +0530	[thread overview]
Message-ID: <20241023150143.113877-3-hkalra@marvell.com> (raw)
In-Reply-To: <20241023150143.113877-1-hkalra@marvell.com>

As part of npc tear down sequence flow aging resources are
cleaned up while they were already cleaned up when last flow
with aging action was removed. This leads to double free of
some resources.

Fixes: 85e9542d4700 ("common/cnxk: fix flow aging cleanup")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_npc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index 8a951b6360..2b3c90683c 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -389,7 +389,8 @@ roc_npc_fini(struct roc_npc *roc_npc)
 	struct npc *npc = roc_npc_to_npc_priv(roc_npc);
 	int rc;
 
-	npc_aging_ctrl_thread_destroy(roc_npc);
+	if (!roc_npc->flow_age.aged_flows_get_thread_exit)
+		npc_aging_ctrl_thread_destroy(roc_npc);
 
 	rc = npc_flow_free_all_resources(npc);
 	if (rc) {
-- 
2.46.0.469.g4590f2e941


  parent reply	other threads:[~2024-10-23 15:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 15:01 [PATCH 1/8] common/cnxk: common mbox for representor events Harman Kalra
2024-10-23 15:01 ` [PATCH 2/8] net/cnxk: " Harman Kalra
2024-10-23 15:01 ` Harman Kalra [this message]
2024-10-23 15:01 ` [PATCH 4/8] net/cnxk: fix eswitch multiseg Harman Kalra
2024-10-23 15:01 ` [PATCH 5/8] net/cnxk: append mark ID action Harman Kalra
2024-10-23 15:01 ` [PATCH 6/8] net/cnxk: support single flow dump Harman Kalra
2024-10-23 15:01 ` [PATCH 7/8] common/cnxk: update representee RSS rule via PF Harman Kalra
2024-10-23 15:01 ` [PATCH 8/8] net/cnxk: handle RSS action for representees Harman Kalra

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=20241023150143.113877-3-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=dev@dpdk.org \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@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).