From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9EBA948B69 for ; Fri, 21 Nov 2025 12:22:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97C374026F; Fri, 21 Nov 2025 12:22:02 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 0E6AD4026F for ; Fri, 21 Nov 2025 12:22:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5sWlllYxBaIdj4d+8G45lkjApgHFtkl6L4EsWsNaiqk=; b=Dhkzr15Jb42XA/lSvl37vUuFU2JY8Tt1r2b2nJ8i9eycA624RyfuLLgyDzWILPhSEBnfJK QHmW5o9scEstAHnYLhem1KmCG+VeO7yM+hiD1CLPBbr71irdvSmVTN8DPvDbFr/1r1jKYr MRSzDMUNbqXscs3+XW8JzZ580tFOtNc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-0-KZoYEtP4CrRAsQuiAj8w-1; Fri, 21 Nov 2025 06:21:57 -0500 X-MC-Unique: 0-KZoYEtP4CrRAsQuiAj8w-1 X-Mimecast-MFC-AGG-ID: 0-KZoYEtP4CrRAsQuiAj8w_1763724116 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1F957195609D; Fri, 21 Nov 2025 11:21:56 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E954430044DB; Fri, 21 Nov 2025 11:21:53 +0000 (UTC) From: Kevin Traynor To: Thomas Monjalon Cc: David Marchand , dpdk stable Subject: patch 'test/hash: check memory allocation' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:19:45 +0000 Message-ID: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zM_AHv9RT5TBFanlK8C4jNzp44488boX46jTP8RjzAk_1763724116 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Reviewed-by: David Marchand --- 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@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)