virtio: Protect vqs list access
authorParav Pandit <parav@nvidia.com>
Wed, 21 Jul 2021 14:26:47 +0000 (17:26 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 10 Aug 2021 15:50:55 +0000 (11:50 -0400)
commit0e566c8f0f2e8325e35f6f97e13cde5356b41814
tree2ab087e25fd4df501542acee9b5109ec7d5ffc22
parent249f255476328e597a598ccdbd4414e51a5b6d6e
virtio: Protect vqs list access

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>
drivers/virtio/virtio.c
drivers/virtio/virtio_ring.c
include/linux/virtio.h