patch 'common/cnxk: fix memory leak in CPT init' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:46:45 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ea096d3e488957cb72e339e9822794e0f6bfd2a9

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ea096d3e488957cb72e339e9822794e0f6bfd2a9 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil at marvell.com>
Date: Wed, 17 Jan 2024 16:00:46 +0530
Subject: [PATCH] common/cnxk: fix memory leak in CPT init
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]

dev_init() acquires some resources which need to be cleaned
in case a failure is observed afterwards.

Fixes: c045d2e5cbbc ("common/cnxk: add CPT configuration")

Signed-off-by: Akhil Goyal <gakhil at marvell.com>
---
 drivers/common/cnxk/roc_cpt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 981e85a204..4e23d8c135 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -756,7 +756,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	rc = dev_init(dev, pci_dev);
 	if (rc) {
 		plt_err("Failed to init roc device");
-		goto fail;
+		return rc;
 	}

 	cpt->pci_dev = pci_dev;
@@ -788,6 +788,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	return 0;

 fail:
+	dev_fini(dev, pci_dev);
 	return rc;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.877164463 +0800
+++ 0064-common-cnxk-fix-memory-leak-in-CPT-init.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c Mon Sep 17 00:00:00 2001
+From ea096d3e488957cb72e339e9822794e0f6bfd2a9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list