linux/drivers/vhost
Jason Wang 9b99c4b916 vhost: make sure used idx is seen before log in vhost_add_used_n()
commit 841df92241 upstream.

We miss a write barrier that guarantees used idx is updated and seen
before log. This will let userspace sync and copy used ring before
used idx is update. Fix this by adding a barrier before log_write().

Fixes: 8dd014adfe ("vhost-net: mergeable buffers support")
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:54:25 +00:00
..
Kconfig vhost: Make vhost a separate module 2013-07-07 17:33:44 +03:00
Makefile vhost: Make vhost a separate module 2013-07-07 17:33:44 +03:00
net.c vhost_net: validate sock before trying to put its fd 2018-11-20 18:05:25 +00:00
scsi.c vhost/scsi: potential memory corruption 2015-03-03 14:26:02 +00:00
test.c vhost: move memory pointer to VQs 2014-06-09 16:21:07 +03:00
test.h vhost test module 2010-12-09 16:00:21 +02:00
vhost.c vhost: make sure used idx is seen before log in vhost_add_used_n() 2019-02-11 17:54:25 +00:00
vhost.h vhost: move memory pointer to VQs 2014-06-09 16:21:07 +03:00
vringh.c Add missing module license tag to vring helpers. 2013-05-08 10:49:03 +09:30