Messages in this thread Patch in this message | | | From | Cristian Marussi <> | Subject | [PATCH 2/4] tools/virtio: Add missing spin_lock_init on virtio_test | Date | Tue, 8 Feb 2022 15:25:18 +0000 |
| |
A missing spin_lock_init() call can cause the test to hang indefinitely on spin_lock() at virtqueue creation time.
Signed-off-by: Cristian Marussi <cristian.marussi@arm.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 d882075c097f..d9cb3d22d52f 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -133,6 +133,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features) dev->vdev.dev.driver = &dev->vdriver.driver; 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.17.1
| |