From: Stefano Garzarella Date: Wed, 23 Mar 2022 17:36:25 +0000 (+0100) Subject: vsock/virtio: enable VQs early on probe X-Git-Tag: v5.15.73~5576 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b320893461cfdfbdb89f183737e1d7df67d7d7a;p=platform%2Fkernel%2Flinux-rpi.git vsock/virtio: enable VQs early on probe [ Upstream commit 88704454ef8b00ea91537ae0d47d9348077e0e72 ] 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: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 4a8548b..c5f936f 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -627,6 +627,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev) vdev->priv = vsock; + virtio_device_ready(vdev); + mutex_lock(&vsock->tx_lock); vsock->tx_run = true; mutex_unlock(&vsock->tx_lock);