Skip to content

Commit 32f1b53

Browse files
stefano-garzarellamstsirkin
authored andcommitted
tools/virtio: fix virtio_test execution
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]>
1 parent 4c80936 commit 32f1b53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/virtio/virtio_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features)
130130
memset(dev, 0, sizeof *dev);
131131
dev->vdev.features = features;
132132
INIT_LIST_HEAD(&dev->vdev.vqs);
133+
spin_lock_init(&dev->vdev.vqs_list_lock);
133134
dev->buf_size = 1024;
134135
dev->buf = malloc(dev->buf_size);
135136
assert(dev->buf);

0 commit comments

Comments
 (0)