patch 'net/bnxt/tf_core: fix SRAM allocation failure handling' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:41:53 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 11/07/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/0c78e8403aaaf3bae84a72af3edf927842ebea9f
Thanks.
Luca Boccassi
---
>From 0c78e8403aaaf3bae84a72af3edf927842ebea9f 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 0dffd74cd51..70bdb0ba1b4 100644
--- a/drivers/net/bnxt/tf_core/tf_sram_mgr.c
+++ b/drivers/net/bnxt/tf_core/tf_sram_mgr.c
@@ -710,6 +710,15 @@ 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 {
/* Block exists
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:46.026235458 +0000
+++ 0026-net-bnxt-tf_core-fix-SRAM-allocation-failure-handlin.patch 2026-11-05 16:42:44.921060786 +0000
@@ -1 +1 @@
-From bf39c8c3fec3c13d3a1628a3f5e216ea02a8ba0e Mon Sep 17 00:00:00 2001
+From 0c78e8403aaaf3bae84a72af3edf927842ebea9f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf39c8c3fec3c13d3a1628a3f5e216ea02a8ba0e ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 0dffd74cd5..70bdb0ba1b 100644
+index 0dffd74cd51..70bdb0ba1b4 100644
More information about the stable
mailing list