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

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:34:05 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.7

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/11/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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/aed510b37cc20eab04a7dcaa9083962295bb407f

Thanks.

Kevin

---
>From aed510b37cc20eab04a7dcaa9083962295bb407f 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

[ 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 6179df2f1f..17b5d1e383 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -642,5 +642,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	if (rc) {
 		plt_err("Failed to init roc device");
-		goto fail;
+		return rc;
 	}
 
@@ -674,4 +674,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 
 fail:
+	dev_fini(dev, pci_dev);
 	return rc;
 }
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.446994811 +0000
+++ 0032-common-cnxk-fix-memory-leak-in-CPT-init.patch	2024-03-05 14:08:54.648520760 +0000
@@ -1 +1 @@
-From ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c Mon Sep 17 00:00:00 2001
+From aed510b37cc20eab04a7dcaa9083962295bb407f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 981e85a204..4e23d8c135 100644
+index 6179df2f1f..17b5d1e383 100644
@@ -21 +22 @@
-@@ -757,5 +757,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
+@@ -642,5 +642,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
@@ -28 +29 @@
-@@ -789,4 +789,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
+@@ -674,4 +674,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)



More information about the stable mailing list