patch 'bus/vmbus: fix missing acquire on receive ring index' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:50:35 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/c2095f810194a4eeab96da2f45ab4d4ffc10008b

Thanks.

Luca Boccassi

---
>From c2095f810194a4eeab96da2f45ab4d4ffc10008b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 13 Oct 2026 15:22:17 -0700
Subject: [PATCH] bus/vmbus: fix missing acquire on receive ring index

[ upstream commit cd02f9c247e0d8507f572d68d7381052dfdede65 ]

The receive path checks available data by reading the write index and
then copies ring data. The link between the two is only the comparison,
a control dependency, which does not order load against load on a
weakly ordered architecture: packet data can be read before the host
has finished writing it. Load the write index with acquire, pairing
with the host's release store. This is the equivalent of virt_rmb()
in the Linux hv_pkt_iter code.

On x86 no barrier instruction is added and every affected function
keeps its size; on arm64 the load becomes ldar.

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/private.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index abee1b29f0c..76ef33c36ef 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -12,6 +12,7 @@
 #include <bus_driver.h>
 #include <bus_vmbus_driver.h>
 #include <rte_log.h>
+#include <rte_stdatomic.h>
 #include <rte_eal_paging.h>
 #include <rte_vmbus_reg.h>
 
@@ -154,7 +155,16 @@ vmbus_br_availwrite(const struct vmbus_br *br, uint32_t windex)
 static inline uint32_t
 vmbus_br_availread(const struct vmbus_br *br)
 {
-	return br->dsize - vmbus_br_availwrite(br, br->vbr->windex);
+	uint32_t windex;
+
+	/* Pairs with the host's release store of the write index;
+	 * ring data must not be read before the index.
+	 */
+	windex = rte_atomic_load_explicit(
+		(volatile uint32_t __rte_atomic *)&br->vbr->windex,
+		rte_memory_order_acquire);
+
+	return br->dsize - vmbus_br_availwrite(br, windex);
 }
 
 int vmbus_txbr_write(struct vmbus_br *tbr, const struct iovec iov[], int iovlen,
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:59.124909702 +0000
+++ 0141-bus-vmbus-fix-missing-acquire-on-receive-ring-index.patch	2026-10-27 11:43:53.662064030 +0000
@@ -1 +1 @@
-From cd02f9c247e0d8507f572d68d7381052dfdede65 Mon Sep 17 00:00:00 2001
+From c2095f810194a4eeab96da2f45ab4d4ffc10008b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd02f9c247e0d8507f572d68d7381052dfdede65 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 6b7782724f..33545b6614 100644
+index abee1b29f0c..76ef33c36ef 100644
@@ -39 +40 @@
-@@ -130,7 +131,16 @@ vmbus_br_availwrite(const struct vmbus_br *br, uint32_t windex)
+@@ -154,7 +155,16 @@ vmbus_br_availwrite(const struct vmbus_br *br, uint32_t windex)


More information about the stable mailing list