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

Xueming Li xuemingl at nvidia.com
Tue Feb 18 13:35:19 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
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=14ee2e354918873110f7d602138c08fceff0f485

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 14ee2e354918873110f7d602138c08fceff0f485 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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
@@ -1363,7 +1363,7 @@ ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
 	struct ecore_dcbx_mib_meta_data data;
 	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++) {
 		OSAL_MEM_ZERO(&data, sizeof(data));
@@ -1381,9 +1381,9 @@ ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
 		if (!tlvs.length)
 			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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-18 19:39:03.613071934 +0800
+++ 0084-net-qede-fix-nested-loops.patch	2025-02-18 19:39:00.728244030 +0800
@@ -1 +1 @@
-From c8b3833965dc84914e94776cadfc8fb48c34459b Mon Sep 17 00:00:00 2001
+From 14ee2e354918873110f7d602138c08fceff0f485 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c8b3833965dc84914e94776cadfc8fb48c34459b ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list