patch 'bus/vmbus: fix ring buffer ordering on weakly ordered CPUs' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:50:34 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/23f07ed60957159d0f239170b0e1352dea5f5d8f
Thanks.
Luca Boccassi
---
>From 23f07ed60957159d0f239170b0e1352dea5f5d8f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 13 Oct 2026 15:22:16 -0700
Subject: [PATCH] bus/vmbus: fix ring buffer ordering on weakly ordered CPUs
[ upstream commit 5db6ec2f87063c2a1e72f691b9f09d365917f466 ]
The read index update in vmbus_rxbr_read() was only protected by a
compiler barrier. On a weakly ordered architecture the store of rindex
can become visible to the host before the data copy completes, allowing
the host to reuse and overwrite ring data still being read. Use a
release store for the read index.
On x86 no barrier instruction is added, only a different instruction
schedule; on arm64 the store becomes stlr.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Long Li <longli at microsoft.com>
Reviewed-by: Wei Hu <weh at microsoft.com>
---
drivers/bus/vmbus/vmbus_bufring.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/vmbus/vmbus_bufring.c b/drivers/bus/vmbus/vmbus_bufring.c
index fcb97287dcd..f622869974b 100644
--- a/drivers/bus/vmbus/vmbus_bufring.c
+++ b/drivers/bus/vmbus/vmbus_bufring.c
@@ -237,10 +237,13 @@ vmbus_rxbr_read(struct vmbus_br *rbr, void *data, size_t dlen, size_t skip)
*/
rindex = vmbus_br_idxinc(rindex, sizeof(uint64_t), br_dsize);
- /* Update the read index _after_ the channel packet is fetched. */
- rte_compiler_barrier();
-
- vbr->rindex = rindex;
+ /*
+ * Update the read index after the channel packet is fetched.
+ * Release store ensures the host can not observe the new read
+ * index before the data copy is complete.
+ */
+ rte_atomic_store_explicit((volatile uint32_t __rte_atomic *)&vbr->rindex,
+ rindex, rte_memory_order_release);
return 0;
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:59.081657261 +0000
+++ 0140-bus-vmbus-fix-ring-buffer-ordering-on-weakly-ordered.patch 2026-10-27 11:43:53.662064030 +0000
@@ -1 +1 @@
-From 5db6ec2f87063c2a1e72f691b9f09d365917f466 Mon Sep 17 00:00:00 2001
+From 23f07ed60957159d0f239170b0e1352dea5f5d8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5db6ec2f87063c2a1e72f691b9f09d365917f466 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index b49725da3e..86dc446786 100644
+index fcb97287dcd..f622869974b 100644
@@ -29 +30 @@
-@@ -238,10 +238,13 @@ vmbus_rxbr_read(struct vmbus_br *rbr, void *data, size_t dlen, size_t skip)
+@@ -237,10 +237,13 @@ vmbus_rxbr_read(struct vmbus_br *rbr, void *data, size_t dlen, size_t skip)
More information about the stable
mailing list