drm/virtio: Add memory barriers for capset cache.
authorDavid Riley <davidriley@chromium.org>
Mon, 10 Jun 2019 21:18:10 +0000 (14:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:27:00 +0000 (07:27 +0200)
commit725c7b78115074f67c4f5f7ece3fcb3abd7d9d1a
tree83151caeeb0f8c07a30ddc70d046a241ebbeb52d
parent11b4e9f3695c155f71cb2bc56d761284bf5e65b1
drm/virtio: Add memory barriers for capset cache.

[ Upstream commit 9ff3a5c88e1f1ab17a31402b96d45abe14aab9d7 ]

After data is copied to the cache entry, atomic_set is used indicate
that the data is the entry is valid without appropriate memory barriers.
Similarly the read side was missing the corresponding memory barriers.

Signed-off-by: David Riley <davidriley@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190610211810.253227-5-davidriley@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/virtio/virtgpu_ioctl.c
drivers/gpu/drm/virtio/virtgpu_vq.c