virtio: Protect vqs list access
authorParav Pandit <parav@nvidia.com>
Wed, 21 Jul 2021 14:26:47 +0000 (17:26 +0300)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:35:41 +0000 (08:35 -0400)
commit293180f5934278d294c9cb4a87c7de4d1c084e0e
treeef34c2edb4fd0e8e61313355f1530ce307a0d522
parent9108120fbe316d5832d968d833fbac086e62249e
virtio: Protect vqs list access

[ Upstream commit 0e566c8f0f2e8325e35f6f97e13cde5356b41814 ]

VQs may be accessed to mark the device broken while they are
created/destroyed. Hence protect the access to the vqs list.

Fixes: e2dcdfe95c0b ("virtio: virtio_break_device() to mark all virtqueues broken.")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Link: https://lore.kernel.org/r/20210721142648.1525924-4-parav@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/virtio/virtio.c
drivers/virtio/virtio_ring.c
include/linux/virtio.h