patch 'net/bnxt: fix stack exhaustion in flow stats' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:50:50 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/26. 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/8c7e7a79e30d3efcfe3aae218f4b0074a3e6bcf4
Thanks.
Luca Boccassi
---
>From 8c7e7a79e30d3efcfe3aae218f4b0074a3e6bcf4 Mon Sep 17 00:00:00 2001
From: Joseph Wong <joseph.wong at broadcom.com>
Date: Tue, 29 Sep 2026 12:03:25 -0600
Subject: [PATCH] net/bnxt: fix stack exhaustion in flow stats
[ upstream commit db221739e5ff6c6a08406ec457674ca088d2c820 ]
In bnxt_flow_stats_cnt(), two variable-length arrays are allocated
on the stack. These arrays are allocated merely to be used to
calculate the dimensions via RTE_DIM(). Replace with the
mathematical equivalent to avoid potential stack exhaustion.
Fixes: 1e2f8aca2cc1 ("net/bnxt: fix allocation of flow stat related structs")
Signed-off-by: Joseph Wong <joseph.wong at broadcom.com>
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 3c5549305ac..987cb2aeb0b 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -1075,12 +1075,8 @@ int bnxt_flow_stats_cnt(struct bnxt *bp)
{
if (bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_COUNTERS &&
bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT &&
- BNXT_FLOW_XSTATS_EN(bp)) {
- struct bnxt_xstats_name_off flow_bytes[bp->max_l2_ctx];
- struct bnxt_xstats_name_off flow_pkts[bp->max_l2_ctx];
-
- return RTE_DIM(flow_bytes) + RTE_DIM(flow_pkts);
- }
+ BNXT_FLOW_XSTATS_EN(bp))
+ return 2 * bp->max_l2_ctx;
return 0;
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:59.713768189 +0000
+++ 0156-net-bnxt-fix-stack-exhaustion-in-flow-stats.patch 2026-10-27 11:43:53.706065391 +0000
@@ -1 +1 @@
-From db221739e5ff6c6a08406ec457674ca088d2c820 Mon Sep 17 00:00:00 2001
+From 8c7e7a79e30d3efcfe3aae218f4b0074a3e6bcf4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit db221739e5ff6c6a08406ec457674ca088d2c820 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 37b33f0505..4074613eb0 100644
+index 3c5549305ac..987cb2aeb0b 100644
@@ -24 +25 @@
-@@ -1079,12 +1079,8 @@ int bnxt_flow_stats_cnt(struct bnxt *bp)
+@@ -1075,12 +1075,8 @@ int bnxt_flow_stats_cnt(struct bnxt *bp)
More information about the stable
mailing list