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 AFBD748AEF for ; Wed, 12 Nov 2025 17:53:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA60840662; Wed, 12 Nov 2025 17:53:14 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 66416402A0 for ; Wed, 12 Nov 2025 17:53:13 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-42b3c965df5so728072f8f.1 for ; Wed, 12 Nov 2025 08:53:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762966393; x=1763571193; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZSJh79+jBsZ/Y81bNcfgwCcUFcA/AgGY7EVJAtZDW8w=; b=OroYknOKZDj6Sa2ZKAemwig4JAoYqO++wXwJS43dsOfpqYY9PYD2mhBfm8bYjr4MmQ hSNEZylBoRR4jf4ccZWPAZBWDDLr1hRKKP6V07VRe9cxrWZwmjm7U2+aT0coUA9k5vnA 77ery8gdmF8D3s35ez8oUgoN+uV1wVi4lTehM0iNpihWJ2pUYjf7FwWyt6h/7duHY/dW c5xLA5cFWXfqo+SEvqqZd8uQkHUr07eHL+W5yn1nPcZMD0c/IxBcK0Fm/27kxLk8QV9k fOkLQuQdK9aS+42DidNWrEE+OtSLV8fISAP+lDMEPXV1B4V2kDaH+6dg3QevoRnPKf7W 3hvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762966393; x=1763571193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZSJh79+jBsZ/Y81bNcfgwCcUFcA/AgGY7EVJAtZDW8w=; b=BDP66zUah0WE6Pg3F62FkvobNdkMHFpj7s0R/dNJ6l0hNpcUd6hsGxKZq7h0GQYxZ5 bXvYtUYeNlFogO+jXSJkoSvoZj1joPM8mQOq0+u5PagKeMGyXHtlQJHNWtXo3sOGwzNh AWRiF6kWrBIIkhfFxk4Z/JQniJ+wLN/u5IPk9J93b3DcTXfMQjMRZTBf+y4X/nsywanN mftgnmr/bU4ijNB6METPqejfy7M7uCvKYrRPTllZOzg+V84zjzgk4LnFsK0A4GxJctUj lse75NjodnXKj3OcsM7b8K+oaKHR9VXOXLE1i/ROi38OACm+MTE8TzTwCkdYw9YCeaM/ UIJQ== X-Forwarded-Encrypted: i=1; AJvYcCUBUipG/Rh0F2FEGqjodWPCOU/YRxIax1uG5jaedbwx7TLfP1O5cUHGG+2+Y0su6VxqMYXfKyQ=@dpdk.org X-Gm-Message-State: AOJu0Yx1v3XgVCR8+qsF5LyHjx0cfhO/RL7y1+0yqipq/uzNodYzN/RI D1viO3kY8cHkT1F9/TCGVKftjJpo54OoEN8WM8rFu9nZBWxMnjJUy5xusMBvHA== X-Gm-Gg: ASbGncvv35Ns0Jdp4SucwodHxv3REVS0eh7hy2xoNC1nKxBKxXHA22KHmK39GLEtR03 GKd9Cllu8GRHOvkcV1aEkTm62Q2GMRaruknJUy3eDUs+RmY2CqiY6it1pHNFAmI2mIW/2EWfDbM 8RHd33OYR8kYNuqN+VPguMeUYuLMYZzVv3TTLmyURYsq93aOzUcPbY9h5zV7tXystkaICHZVVtH H2K+8o8vnZEAZ7wGDdbjgnhZQqsoLhPopw20q3h2cKSaZO2bJ1sq0s8H9wBEbd+Jtf6KXUQt1X1 U9kym0n1VwDbczFgVn4GIEO8pPBoymBjsRrRQf1H8pcSrFIblcOwBdwIlAiGs/OV2OlyFaqTK3T atYBkOOGf2zg/BgpQEMQ5FyoUdVGo1K7u0BLdMQC+qlYPyCpMW6x14ZvUz2xrIqDrqdMn/M3Axg wE7ZmudA== X-Google-Smtp-Source: AGHT+IE05Wm8Q4tkjYpW4uEAMAQ1KNsJhGUbMTkbHM96GAAMz4Qf+FB2yihi3r2iR9LdvCYdOM8lMg== X-Received: by 2002:a05:6000:26c9:b0:3ee:3dce:f672 with SMTP id ffacd0b85a97d-42b4bb9099cmr2720478f8f.4.1762966392789; Wed, 12 Nov 2025 08:53:12 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:a397:14bc:5982:5745]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-42ac679e06csm34946385f8f.47.2025.11.12.08.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Nov 2025 08:53:12 -0800 (PST) From: luca.boccassi@gmail.com To: Thomas Monjalon Cc: David Marchand , dpdk stable Subject: patch 'test/hash: check memory allocation' has been queued to stable release 22.11.11 Date: Wed, 12 Nov 2025 16:52:15 +0000 Message-ID: <20251112165308.1618107-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-79-luca.boccassi@gmail.com> References: <20251027162001.3710450-79-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.11 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/14/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/382d9f327ed1d097b89e78b5b5e0cfa578fbbca9 Thanks. Luca Boccassi --- >From 382d9f327ed1d097b89e78b5b5e0cfa578fbbca9 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 9cc5f3487c..f85d291569 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 cf86046a2f..b06322ce35 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.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-12 16:20:41.054036146 +0000 +++ 0001-test-hash-check-memory-allocation.patch 2025-11-12 16:20:40.875715664 +0000 @@ -1 +1 @@ -From 77e23b2d7ee45d153f588611a3fa479e4cf0c9b6 Mon Sep 17 00:00:00 2001 +From 382d9f327ed1d097b89e78b5b5e0cfa578fbbca9 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 9cc5f3487c..f85d291569 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 cf86046a2f..b06322ce35 100644