* [PATCH] tools/virtio: fix virtio_test execution
@ 2022-01-18 15:06 Stefano Garzarella
2022-01-19 2:45 ` Jason Wang
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Garzarella @ 2022-01-18 15:06 UTC (permalink / raw)
To: virtualization; +Cc: Jason Wang, Michael S. Tsirkin, linux-kernel
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>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/virtio: fix virtio_test execution
2022-01-18 15:06 [PATCH] tools/virtio: fix virtio_test execution Stefano Garzarella
@ 2022-01-19 2:45 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2022-01-19 2:45 UTC (permalink / raw)
To: Stefano Garzarella; +Cc: virtualization, Michael S. Tsirkin, linux-kernel
On Tue, Jan 18, 2022 at 11:06 PM Stefano Garzarella <sgarzare@redhat.com> 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@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-19 2:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 15:06 [PATCH] tools/virtio: fix virtio_test execution Stefano Garzarella
2022-01-19 2:45 ` Jason Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®