mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
tools/virtio: fix virtio_test execution
[ Upstream commit 32f1b53fe8
]
virtio_test hangs on __vring_new_virtqueue() because `vqs_list_lock`
is not initialized.
Let's initialize it in vdev_info_init().
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20220118150631.167015-1-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f8f8e96048
commit
afffb79a2d
1 changed files with 1 additions and 0 deletions
|
@ -130,6 +130,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features)
|
||||||
memset(dev, 0, sizeof *dev);
|
memset(dev, 0, sizeof *dev);
|
||||||
dev->vdev.features = features;
|
dev->vdev.features = features;
|
||||||
INIT_LIST_HEAD(&dev->vdev.vqs);
|
INIT_LIST_HEAD(&dev->vdev.vqs);
|
||||||
|
spin_lock_init(&dev->vdev.vqs_list_lock);
|
||||||
dev->buf_size = 1024;
|
dev->buf_size = 1024;
|
||||||
dev->buf = malloc(dev->buf_size);
|
dev->buf = malloc(dev->buf_size);
|
||||||
assert(dev->buf);
|
assert(dev->buf);
|
||||||
|
|
Loading…
Reference in a new issue