patch 'test/hash: check memory allocation' has been queued to stable release 23.11.6

Shani Peretz shperetz at nvidia.com
Thu Dec 25 10:17:34 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.6

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/30/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/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/e593c2f4728f0b84b31215281b3a0fcbea908670

Thanks.

Shani

---
>From e593c2f4728f0b84b31215281b3a0fcbea908670 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 4997a01249..0ee1d64b02 100644
--- a/app/test/test_hash_readwrite.c
+++ b/app/test/test_hash_readwrite.c
@@ -64,6 +64,11 @@ 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)
 			break;
diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 5d18850e19..5a52038247 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -1310,6 +1310,10 @@ 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;
 
 	if (rte_hash_rcu_qsbr_add(tbl_rwc_test_param.h, &rcu_config) < 0) {
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-12-25 11:16:37.018612552 +0200
+++ 0013-test-hash-check-memory-allocation.patch	2025-12-25 11:16:35.362964000 +0200
@@ -1 +1 @@
-From 77e23b2d7ee45d153f588611a3fa479e4cf0c9b6 Mon Sep 17 00:00:00 2001
+From e593c2f4728f0b84b31215281b3a0fcbea908670 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 4997a01249..0ee1d64b02 100644
@@ -26 +27 @@
-@@ -70,6 +70,11 @@ test_hash_readwrite_worker(__rte_unused void *arg)
+@@ -64,6 +64,11 @@ test_hash_readwrite_worker(__rte_unused void *arg)
@@ -39 +40 @@
-index 864c3059d9..bef987d29d 100644
+index 5d18850e19..5a52038247 100644


More information about the stable mailing list