patch 'common/cnxk: fix array out-of-bounds' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:08:43 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/345a593473d06006a51226d0ce7489353a702bd3
Thanks.
Kevin
---
>From 345a593473d06006a51226d0ce7489353a702bd3 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 30 Dec 2025 10:55:14 -0800
Subject: [PATCH] common/cnxk: fix array out-of-bounds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4a6154a7bd275f2cbe9a3aee272b393fd00aeaed ]
Gcc-16 detects out of bounds reference in this code.
In function ‘nix_inl_selftest_work_cb’,
inlined from ‘inl_outb_soft_exp_poll’
at ../drivers/common/cnxk/roc_nix_inl_dev.c:1173:4,
inlined from ‘nix_inl_outb_poll_thread’
at ../drivers/common/cnxk/roc_nix_inl_dev.c:1201:6:
drivers/common/cnxk/roc_nix_inl_dev.c:43:19: warning:
array subscript 1 is outside array bounds of ‘uint64_t[1]’
{aka ‘long unsigned int[1]’} [-Warray-bounds=]
43 | uintptr_t work = gw[1];
| ^~~~
In function ‘nix_inl_outb_poll_thread’:
drivers/common/cnxk/roc_nix_inl_dev.c:1172:34:
note: at offset 8 into object ‘tmp’ of size 8
1172 | uint64_t tmp = ~(uint32_t)0x0;
| ^~~
Fixes: bea5d990a93b ("net/cnxk: support outbound soft expiry notification")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/common/cnxk/roc_nix_inl_dev.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index 1eb96f913a..3a4f1ac1e7 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -1170,10 +1170,8 @@ inl_outb_soft_exp_poll(struct nix_inl_dev *inl_dev, uint32_t ring_idx)
if (sa != NULL) {
- uint64_t tmp = ~(uint32_t)0x0;
- inl_dev->work_cb(&tmp, sa, NIX_INL_SOFT_EXPIRY_THRD, NULL, port_id);
- __atomic_store_n(ring_base + tail_l + 1, 0ULL,
- __ATOMIC_RELAXED);
- __atomic_fetch_add((uint32_t *)ring_base, 1,
- __ATOMIC_ACQ_REL);
+ uint64_t tmp[2];
+ inl_dev->work_cb(tmp, sa, NIX_INL_SOFT_EXPIRY_THRD, NULL, port_id);
+ __atomic_store_n(ring_base + tail_l + 1, 0ULL, __ATOMIC_RELAXED);
+ __atomic_fetch_add((uint32_t *)ring_base, 1, __ATOMIC_ACQ_REL);
} else
plt_err("Invalid SA");
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:48.721872876 +0000
+++ 0041-common-cnxk-fix-array-out-of-bounds.patch 2026-02-26 10:16:46.952459242 +0000
@@ -1 +1 @@
-From 4a6154a7bd275f2cbe9a3aee272b393fd00aeaed Mon Sep 17 00:00:00 2001
+From 345a593473d06006a51226d0ce7489353a702bd3 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4a6154a7bd275f2cbe9a3aee272b393fd00aeaed ]
+
@@ -28 +29,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list