Re: [PATCH] tools/virtio: fix virtio_test execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 18, 2022 at 11:06 PM Stefano Garzarella <sgarzare@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>

Acked-by: Jason Wang <jasowang@xxxxxxxxxx>

> ---
>  tools/virtio/virtio_test.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
> index cb3f29c09aff..23f142af544a 100644
> --- a/tools/virtio/virtio_test.c
> +++ b/tools/virtio/virtio_test.c
> @@ -130,6 +130,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features)
>         memset(dev, 0, sizeof *dev);
>         dev->vdev.features = features;
>         INIT_LIST_HEAD(&dev->vdev.vqs);
> +       spin_lock_init(&dev->vdev.vqs_list_lock);
>         dev->buf_size = 1024;
>         dev->buf = malloc(dev->buf_size);
>         assert(dev->buf);
> --
> 2.31.1
>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux