diff mbox

viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin <mst@redhat.com>

Message ID 4AED65C9.70602@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vadim Rozenfeld Nov. 1, 2009, 10:41 a.m. UTC
None
diff mbox

Patch

diff --git a/viostor/virtio_ring.c b/viostor/virtio_ring.c
index d099bb8..2911cef 100644
--- a/viostor/virtio_ring.c
+++ b/viostor/virtio_ring.c
@@ -237,6 +237,8 @@  vring_get_buf(
          return NULL;
      }

+    rmb();
+
      i = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].id;
      *len = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].len;