tools/virtio: initialize spinlocks in vring_test.c
authorRicardo Cañuelo <ricardo.canuelo@collabora.com>
Wed, 12 Oct 2022 06:29:49 +0000 (08:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:30 +0000 (07:24 +0100)
commitdc6466fcdefe0ec08f5b8192d40d5df89b96b5b0
tree983a1e4b49b8f1e28cd7ef2f0c7378f135315472
parenta65644cef5dbba3b21be958e742702fb30524014
tools/virtio: initialize spinlocks in vring_test.c

[ Upstream commit c262f75cb6bb5a63828e72ce3b8fe808e5029479 ]

The virtio_device vqs_list spinlocks must be initialized before use to
prevent functions that manipulate the device virtualqueues, such as
vring_new_virtqueue(), from blocking indefinitely.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Message-Id: <20221012062949.1526176-1-ricardo.canuelo@collabora.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/virtio/vringh_test.c