DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,
	stable@dpdk.org, Long Wu <long.wu@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH 1/8] net/nfp: fix resource leak of secondary process
Date: Fri, 19 Apr 2024 11:12:19 +0800	[thread overview]
Message-ID: <20240419031226.1191069-2-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240419031226.1191069-1-chaoyong.he@corigine.com>

Fix one resource leak problem in the abnormal logic of secondary process.

Fixes: 016141b18b3a ("net/nfp: refactor secondary process probe")
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index b711e15b9f..98d8e87028 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -2123,7 +2123,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	if (sym_tbl == NULL) {
 		PMD_INIT_LOG(ERR, "Something is wrong with the firmware symbol table");
 		ret = -EIO;
-		goto sync_free;
+		goto cpp_cleanup;
 	}
 
 	/* Read the app ID of the firmware loaded */
@@ -2171,6 +2171,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 
 sym_tbl_cleanup:
 	free(sym_tbl);
+cpp_cleanup:
+	nfp_cpp_free(cpp);
 sync_free:
 	nfp_sync_free(sync);
 pf_cleanup:
-- 
2.39.1


  reply	other threads:[~2024-04-19  3:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19  3:12 [PATCH 0/8] refactor logic to support " Chaoyong He
2024-04-19  3:12 ` Chaoyong He [this message]
2024-04-19  3:12 ` [PATCH 2/8] net/nfp: fix configuration BAR problem Chaoyong He
2024-04-19  3:12 ` [PATCH 3/8] net/nfp: adjust the data field of Rx/Tx queue Chaoyong He
2024-04-19  3:12 ` [PATCH 4/8] net/nfp: add the process private structure Chaoyong He
2024-04-19  3:12 ` [PATCH 5/8] net/nfp: move device info data field Chaoyong He
2024-04-19  3:12 ` [PATCH 6/8] net/nfp: unify CPP acquire method Chaoyong He
2024-04-19  3:12 ` [PATCH 7/8] net/nfp: remove ethernet device data field Chaoyong He
2024-04-19  3:12 ` [PATCH 8/8] net/nfp: unify port create and destroy interface Chaoyong He
2024-04-19  5:23 ` [PATCH 0/8] refactor logic to support secondary process Chaoyong He
2024-04-19  5:23   ` [PATCH v2 1/8] net/nfp: fix resource leak of " Chaoyong He
2024-04-19  5:23   ` [PATCH v2 2/8] net/nfp: fix configuration BAR problem Chaoyong He
2024-04-19  5:23   ` [PATCH v2 3/8] net/nfp: adjust the data field of Rx/Tx queue Chaoyong He
2024-04-19  5:23   ` [PATCH v2 4/8] net/nfp: add the process private structure Chaoyong He
2024-04-19  5:23   ` [PATCH v2 5/8] net/nfp: move device info data field Chaoyong He
2024-04-19  5:23   ` [PATCH v2 6/8] net/nfp: unify CPP acquire method Chaoyong He
2024-04-19  5:23   ` [PATCH v2 7/8] net/nfp: remove ethernet device data field Chaoyong He
2024-04-19  5:23   ` [PATCH v2 8/8] net/nfp: unify port create and destroy interface Chaoyong He
2024-05-20 22:19   ` [PATCH 0/8] refactor logic to support secondary process Ferruh Yigit
2024-05-21  2:17     ` Chaoyong He
2024-05-21 11:09       ` Ferruh Yigit
2024-05-21 11:24         ` Chaoyong He
2024-05-21 12:54           ` Ferruh Yigit
2024-05-21 15:08   ` Ferruh Yigit

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=20240419031226.1191069-2-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.com \
    --cc=stable@dpdk.org \
    /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).