patch 'stack: fix pop in C11 implementation' has been queued to stable release 22.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Mar 7 13:24:19 CET 2025


Hi,

FYI, your patch has been queued to stable release 22.11.8

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/09/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/851486f6cc3e1324c1c8c7243bcb8286130c32ec

Thanks.

Luca Boccassi

---
>From 851486f6cc3e1324c1c8c7243bcb8286130c32ec Mon Sep 17 00:00:00 2001
From: Andre Muezerie <andremue at linux.microsoft.com>
Date: Mon, 3 Feb 2025 17:23:37 -0800
Subject: [PATCH] stack: fix pop in C11 implementation

[ upstream commit 916424f2c6029cd8da5c56ed62847a4b09d7e0ac ]

Variable "success" was not being initialized and there was a code
path where the last do/while loop in __rte_stack_lf_pop_elems
looked at the value of this variable before it was set to any.

Compiling with msvc resulted in stack_lf_autotest sometimes crashing.

The fix is to initialize the variable. This same fix was applied to
stack\rte_stack_lf_generic.h in the past but was missed here.

Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")

Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 lib/stack/rte_stack_lf_c11.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/stack/rte_stack_lf_c11.h b/lib/stack/rte_stack_lf_c11.h
index 8403196d51..13ee26be4e 100644
--- a/lib/stack/rte_stack_lf_c11.h
+++ b/lib/stack/rte_stack_lf_c11.h
@@ -77,7 +77,7 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
 {
 	struct rte_stack_lf_head old_head;
 	uint64_t len;
-	int success;
+	int success = 0;
 
 	/* Reserve num elements, if available */
 	len = __atomic_load_n(&list->len, __ATOMIC_RELAXED);
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-03-07 12:23:38.757334778 +0000
+++ 0020-stack-fix-pop-in-C11-implementation.patch	2025-03-07 12:23:38.022838760 +0000
@@ -1 +1 @@
-From 916424f2c6029cd8da5c56ed62847a4b09d7e0ac Mon Sep 17 00:00:00 2001
+From 851486f6cc3e1324c1c8c7243bcb8286130c32ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 916424f2c6029cd8da5c56ed62847a4b09d7e0ac ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 60d46e963b..ee1c79c095 100644
+index 8403196d51..13ee26be4e 100644
@@ -36 +37 @@
- 	len = rte_atomic_load_explicit(&list->len, rte_memory_order_relaxed);
+ 	len = __atomic_load_n(&list->len, __ATOMIC_RELAXED);


More information about the stable mailing list