android_kernel_oneplus_msm8998/drivers/vhost
Jason Wang 04a1c4080c vhost: make sure used idx is seen before log in vhost_add_used_n()
[ Upstream commit 841df922417eb82c835e93d4b93eb6a68c99d599 ]

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-13 10:05:28 +01:00
..
Kconfig
Makefile
net.c vhost_net: validate sock before trying to put its fd 2018-07-22 14:25:53 +02:00
scsi.c vhost/scsi: truncate T10 PI iov_iter to prot_bytes 2018-11-21 09:27:42 +01:00
test.c
test.h
vhost.c vhost: make sure used idx is seen before log in vhost_add_used_n() 2019-01-13 10:05:28 +01:00
vhost.h
vringh.c