patch 'net/qede: fix nested loops' has been queued to stable release 22.11.8
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Feb 17 18:04:47 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.8
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/19/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/107c0c15493f52e529a139f0f7d0806fb7f439a6
Thanks.
Luca Boccassi
---
>From 107c0c15493f52e529a139f0f7d0806fb7f439a6 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
@@ -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.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-17 16:13:19.433583861 +0000
+++ 0074-net-qede-fix-nested-loops.patch 2025-02-17 16:13:16.870441592 +0000
@@ -1 +1 @@
-From c8b3833965dc84914e94776cadfc8fb48c34459b Mon Sep 17 00:00:00 2001
+From 107c0c15493f52e529a139f0f7d0806fb7f439a6 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