patch 'net/i40e/base: fix resource leakage' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:33:59 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/c0773b56c2bc757589dd70411f8b118e55f78031

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From c0773b56c2bc757589dd70411f8b118e55f78031 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei at 163.com>
Date: Sat, 21 Aug 2021 14:30:08 +0800
Subject: [PATCH] net/i40e/base: fix resource leakage

[ upstream commit 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 ]

In the i40e_init_arq function, when the i40e_config_arq_regs function
returns from processing failure, the previously applied arq_bufs resource
is not released, which leads to leakage.
The patch is processed in the same way as the i40e_init_asq function,
maintaining a unified coding style.

Fixes: 49ea51605be4 ("net/i40e/base: gracefully clean the resources")

Signed-off-by: Qiming Chen <chenqiming_huawei at 163.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 584da0383c..0c07ff0045 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -468,7 +468,7 @@ enum i40e_status_code i40e_init_arq(struct i40e_hw *hw)
 	/* initialize base registers */
 	ret_code = i40e_config_arq_regs(hw);
 	if (ret_code != I40E_SUCCESS)
-		goto init_adminq_free_rings;
+		goto init_config_regs;
 
 	/* success! */
 	hw->aq.arq.count = hw->aq.num_arq_entries;
@@ -476,6 +476,10 @@ enum i40e_status_code i40e_init_arq(struct i40e_hw *hw)
 
 init_adminq_free_rings:
 	i40e_free_adminq_arq(hw);
+	return ret_code;
+
+init_config_regs:
+	i40e_free_arq_bufs(hw);
 
 init_adminq_exit:
 	return ret_code;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:08.113221633 +0100
+++ 0035-net-i40e-base-fix-resource-leakage.patch	2021-11-30 16:50:05.642872444 +0100
@@ -1 +1 @@
-From 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 Mon Sep 17 00:00:00 2001
+From c0773b56c2bc757589dd70411f8b118e55f78031 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 0da45f03e4..235667d57a 100644
+index 584da0383c..0c07ff0045 100644


More information about the stable mailing list