patch 'net/qede: fix nested loops' has been queued to stable release 24.11.2

Kevin Traynor ktraynor at redhat.com
Thu Feb 13 10:59:23 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/25. 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/5c535b99b879852b58acba259c847511e776b4a7

Thanks.

Kevin

---
>From 5c535b99b879852b58acba259c847511e776b4a7 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 5 Feb 2025 08:23:18 -0800
Subject: [PATCH] net/qede: fix nested loops

[ upstream commit c8b3833965dc84914e94776cadfc8fb48c34459b ]

Using variable in outer loop, and inner loop is obvious bug.
This bug is in base code, so likely on other platforms as well.

Link: https://pvs-studio.com/en/blog/posts/cpp/1183/
Fixes: 81dba2b2ff61 ("net/qede/base: add LLDP support")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/qede/base/ecore_dcbx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index 31234f18cf..72bbedd65a 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -1364,5 +1364,5 @@ ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
 	enum _ecore_status_t rc = ECORE_SUCCESS;
 	struct lldp_received_tlvs_s tlvs;
-	int i;
+	int i, j;
 
 	for (i = 0; i < LLDP_MAX_LLDP_AGENTS; i++) {
@@ -1382,7 +1382,7 @@ ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
 			continue;
 
-		for (i = 0; i < MAX_TLV_BUFFER; i++)
-			tlvs.tlvs_buffer[i] =
-				OSAL_CPU_TO_BE32(tlvs.tlvs_buffer[i]);
+		for (j = 0; j < MAX_TLV_BUFFER; j++)
+			tlvs.tlvs_buffer[j] =
+				OSAL_CPU_TO_BE32(tlvs.tlvs_buffer[j]);
 
 		OSAL_LLDP_RX_TLVS(p_hwfn, tlvs.tlvs_buffer, tlvs.length);
-- 
2.48.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-12 17:29:46.778581688 +0000
+++ 0116-net-qede-fix-nested-loops.patch	2025-02-12 17:29:34.652947732 +0000
@@ -1 +1 @@
-From c8b3833965dc84914e94776cadfc8fb48c34459b Mon Sep 17 00:00:00 2001
+From 5c535b99b879852b58acba259c847511e776b4a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8b3833965dc84914e94776cadfc8fb48c34459b ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list