Skip to content

Commit 8870445

Browse files
stefano-garzarellakuba-moo
authored andcommitted
vsock/virtio: enable VQs early on probe
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, but virtio-vsock driver uses VQs in the probe function to fill rx and event VQs with new buffers. Let's fix this, calling virtio_device_ready() before using VQs in the probe function. Fixes: 0ea9e1d ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent c1011c0 commit 8870445

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

net/vmw_vsock/virtio_transport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
627627

628628
vdev->priv = vsock;
629629

630+
virtio_device_ready(vdev);
631+
630632
mutex_lock(&vsock->tx_lock);
631633
vsock->tx_run = true;
632634
mutex_unlock(&vsock->tx_lock);

0 commit comments

Comments
 (0)