patch 'hash: avoid leaking entries on RCU defer queue failure' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Mar 19 11:03:07 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/23/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/503d04e4784b04815e0e46bbceeb67e3b82eb7ef
Thanks.
Kevin
---
>From 503d04e4784b04815e0e46bbceeb67e3b82eb7ef Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry at redhat.com>
Date: Fri, 6 Mar 2026 09:47:11 +0100
Subject: [PATCH] hash: avoid leaking entries on RCU defer queue failure
[ upstream commit cbc677ce0df333b92f7838af47699fa68796a86e ]
When rte_rcu_qsbr_dq_enqueue() fails in DQ mode, the deleted key slot
is never freed and becomes permanently leaked. Fall back to synchronous
reclamation instead of only logging an error.
Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
Signed-off-by: Robin Jarry <rjarry at redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
lib/hash/rte_cuckoo_hash.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index f910e27904..d5663d11f7 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -1854,7 +1854,7 @@ return_key:
rcu_dq_entry.key_idx = ret + 1;
rcu_dq_entry.ext_bkt_idx = index;
- if (h->dq == NULL) {
+ if (h->dq == NULL || rte_rcu_qsbr_dq_enqueue(h->dq, &rcu_dq_entry) != 0) {
/* Wait for quiescent state change if using
- * RTE_HASH_QSBR_MODE_SYNC
+ * RTE_HASH_QSBR_MODE_SYNC or if RCU enqueue failed.
*/
rte_rcu_qsbr_synchronize(h->hash_rcu_cfg->v,
@@ -1862,8 +1862,5 @@ return_key:
__hash_rcu_qsbr_free_resource((void *)((uintptr_t)h),
&rcu_dq_entry, 1);
- } else if (h->dq)
- /* Push into QSBR FIFO if using RTE_HASH_QSBR_MODE_DQ */
- if (rte_rcu_qsbr_dq_enqueue(h->dq, &rcu_dq_entry) != 0)
- HASH_LOG(ERR, "Failed to push QSBR FIFO");
+ }
}
__hash_rw_writer_unlock(h);
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 10:01:09.077843838 +0000
+++ 0069-hash-avoid-leaking-entries-on-RCU-defer-queue-failur.patch 2026-03-19 10:01:07.127231680 +0000
@@ -1 +1 @@
-From cbc677ce0df333b92f7838af47699fa68796a86e Mon Sep 17 00:00:00 2001
+From 503d04e4784b04815e0e46bbceeb67e3b82eb7ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cbc677ce0df333b92f7838af47699fa68796a86e ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 3f382dd117..36b3b477a5 100644
+index f910e27904..d5663d11f7 100644
@@ -23 +24 @@
-@@ -1871,7 +1871,7 @@ return_key:
+@@ -1854,7 +1854,7 @@ return_key:
@@ -33 +34 @@
-@@ -1879,8 +1879,5 @@ return_key:
+@@ -1862,8 +1862,5 @@ return_key:
More information about the stable
mailing list