]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: order used ring after used index read
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 25 Oct 2009 13:28:53 +0000 (15:28 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 28 Oct 2009 22:20:37 +0000 (08:50 +1030)
commit5170de6de5720da243049ab5f70ccc063aaf595a
treeec51d4cba4240af6011f4fabfda06a21532761da
parente0f880b22b0d6dcf572cf745d91b1d976421b986
virtio: order used ring after used index read

On SMP guests, reads from the ring might bypass used index reads. This
causes guest crashes because host writes to used index to signal ring
data readiness.  Fix this by inserting rmb before used ring reads.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
drivers/virtio/virtio_ring.c