patch 'net/bnxt/tf_core: fix SRAM allocation failure handling' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:03:05 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/d1545e545ac69fd9f46d722f969b8e1af438de96
Thanks.
Kevin
---
>From d1545e545ac69fd9f46d722f969b8e1af438de96 Mon Sep 17 00:00:00 2001
From: Manish Kurup <manish.kurup at broadcom.com>
Date: Tue, 20 Oct 2026 01:59:47 -0500
Subject: [PATCH] net/bnxt/tf_core: fix SRAM allocation failure handling
[ upstream commit bf39c8c3fec3c13d3a1628a3f5e216ea02a8ba0e ]
In tf_sram_mgr_alloc(), two sequential 64B blocks are allocated from
the resource manager before the tf_sram_block tracking structure is
created with tf_sram_alloc_block(). If that allocation fails it
returns NULL, but the NULL result was not checked: the RM indices
stayed marked in use and could never be reused, and the NULL block
was then dereferenced via block->block_id.
Release both RM indices and return -ENOMEM when the block structure
cannot be allocated, as is already done when the two indices are not
sequential.
Fixes: 37ff91c158a3 ("net/bnxt: add SRAM manager model")
Signed-off-by: Manish Kurup <manish.kurup at broadcom.com>
---
drivers/net/bnxt/tf_core/tf_sram_mgr.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/bnxt/tf_core/tf_sram_mgr.c b/drivers/net/bnxt/tf_core/tf_sram_mgr.c
index 0dffd74cd5..70bdb0ba1b 100644
--- a/drivers/net/bnxt/tf_core/tf_sram_mgr.c
+++ b/drivers/net/bnxt/tf_core/tf_sram_mgr.c
@@ -711,4 +711,13 @@ int tf_sram_mgr_alloc(void *sram_handle,
block_id = index;
block = tf_sram_alloc_block(slice_list, block_id);
+ if (unlikely(!block)) {
+ fparms.index = index;
+ fparms.subtype = parms->tbl_type;
+ fparms.rm_db = parms->rm_db;
+ tf_rm_free(&fparms);
+ fparms.index = next_index;
+ tf_rm_free(&fparms);
+ return -ENOMEM;
+ }
} else {
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:46.571433217 +0000
+++ 0259-net-bnxt-tf_core-fix-SRAM-allocation-failure-handlin.patch 2026-12-03 12:52:39.210580779 +0000
@@ -1 +1 @@
-From bf39c8c3fec3c13d3a1628a3f5e216ea02a8ba0e Mon Sep 17 00:00:00 2001
+From d1545e545ac69fd9f46d722f969b8e1af438de96 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf39c8c3fec3c13d3a1628a3f5e216ea02a8ba0e ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list