mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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: e2dcdfe95c ("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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
249f255476
commit
0e566c8f0f
@@ -110,6 +110,7 @@ struct virtio_device {
|
||||
bool config_enabled;
|
||||
bool config_change_pending;
|
||||
spinlock_t config_lock;
|
||||
spinlock_t vqs_list_lock; /* Protects VQs list access */
|
||||
struct device dev;
|
||||
struct virtio_device_id id;
|
||||
const struct virtio_config_ops *config;
|
||||
|
||||
Reference in New Issue
Block a user