patch 'test/hash: check memory allocation' has been queued to stable release 24.11.4
Kevin Traynor
ktraynor at redhat.com
Fri Nov 21 12:19:45 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.4
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/26/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e6738854499c628d4d92c81f6af5c7e01f543217
Thanks.
Kevin
---
>From e6738854499c628d4d92c81f6af5c7e01f543217 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Thu, 30 Oct 2025 17:03:20 +0100
Subject: [PATCH] test/hash: check memory allocation
[ upstream commit 77e23b2d7ee45d153f588611a3fa479e4cf0c9b6 ]
When reserving a specific memory amount, it was possible to pass
the first allocations and fail on a later allocation
where there was no check, resulting in a crash.
It is fixed by stopping the test if allocation failed.
Fixes: fd368e1982bc ("test/hash: test more corner cases")
Fixes: 9c7d8eed1a45 ("test/hash: add RCU tests")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
app/test/test_hash_readwrite.c | 5 +++++
app/test/test_hash_readwrite_lf_perf.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c
index 1867376ade..a12c90f589 100644
--- a/app/test/test_hash_readwrite.c
+++ b/app/test/test_hash_readwrite.c
@@ -65,4 +65,9 @@ test_hash_readwrite_worker(__rte_unused void *arg)
ret = rte_malloc(NULL, sizeof(int) *
tbl_rw_test_param.num_insert, 0);
+ if (ret == NULL) {
+ printf("allocation failed\n");
+ return -1;
+ }
+
for (i = 0; i < rte_lcore_count(); i++) {
if (worker_core_ids[i] == lcore_id)
diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 864c3059d9..bef987d29d 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -1311,4 +1311,8 @@ test_hash_rcu_qsbr_writer_perf(struct rwc_perf *rwc_perf_results, int rwc_lf,
sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
rv = (struct rte_rcu_qsbr *)rte_zmalloc(NULL, sz, RTE_CACHE_LINE_SIZE);
+ if (rv == NULL) {
+ printf("allocation failed\n");
+ goto err;
+ }
rcu_config.v = rv;
--
2.51.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-11-21 11:05:09.695204140 +0000
+++ 0001-test-hash-check-memory-allocation.patch 2025-11-21 11:05:09.354200704 +0000
@@ -1 +1 @@
-From 77e23b2d7ee45d153f588611a3fa479e4cf0c9b6 Mon Sep 17 00:00:00 2001
+From e6738854499c628d4d92c81f6af5c7e01f543217 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 77e23b2d7ee45d153f588611a3fa479e4cf0c9b6 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 82fe03cc5a..22ccd6df6a 100644
+index 1867376ade..a12c90f589 100644
@@ -26 +27 @@
-@@ -71,4 +71,9 @@ test_hash_readwrite_worker(__rte_unused void *arg)
+@@ -65,4 +65,9 @@ test_hash_readwrite_worker(__rte_unused void *arg)
More information about the stable
mailing list