summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/hyperv.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2016-10-14 18:32:54 +0000
committermikeb <mikeb@openbsd.org>2016-10-14 18:32:54 +0000
commit30bce9ffaa65d0c24c0cef53ec6a3be7b47803ba (patch)
treeb7790102ce4e95dcf71187cdc11818de66f1a997 /sys/dev/pv/hyperv.c
parentCast pointers to uintptr_t to avoid potential signedness errors. (diff)
downloadwireguard-openbsd-30bce9ffaa65d0c24c0cef53ec6a3be7b47803ba.tar.xz
wireguard-openbsd-30bce9ffaa65d0c24c0cef53ec6a3be7b47803ba.zip
The trailing producer index must point to the beginning of the message
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r--sys/dev/pv/hyperv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index 1c54dd75e17..fd83b31d06b 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -1276,7 +1276,7 @@ hv_ring_write(struct hv_ring_data *wrd, struct iovec *iov, int iov_cnt,
for (i = 0; i < iov_cnt; i++)
hv_ring_put(wrd, iov[i].iov_base, iov[i].iov_len);
- indices = (uint64_t)wrd->rd_prod << 32;
+ indices = (uint64_t)oprod << 32;
hv_ring_put(wrd, (uint8_t *)&indices, sizeof(indices));
membar_sync();