Skip to content

Commit a816878

Browse files
committed
Merge branch 'vsock-virtio-enable-vqs-early-on-probe-and-finish-the-setup-before-using-them'
Stefano Garzarella says: ==================== vsock/virtio: enable VQs early on probe and finish the setup before using them The first patch fixes a virtio-spec violation. The other two patches complete the driver configuration before using the VQs in the probe. The patch order should simplify backporting in stable branches. v2: https://lore.kernel.org/netdev/20220323084954.11769-1-sgarzare@redhat.com/ v1: https://lore.kernel.org/netdev/20220322103823.83411-1-sgarzare@redhat.com/ ==================== Link: https://lore.kernel.org/r/20220323173625.91119-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 9fe087d + 8870445 commit a816878

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

net/vmw_vsock/virtio_transport.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,13 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
622622
INIT_WORK(&vsock->event_work, virtio_transport_event_work);
623623
INIT_WORK(&vsock->send_pkt_work, virtio_transport_send_pkt_work);
624624

625+
if (virtio_has_feature(vdev, VIRTIO_VSOCK_F_SEQPACKET))
626+
vsock->seqpacket_allow = true;
627+
628+
vdev->priv = vsock;
629+
630+
virtio_device_ready(vdev);
631+
625632
mutex_lock(&vsock->tx_lock);
626633
vsock->tx_run = true;
627634
mutex_unlock(&vsock->tx_lock);
@@ -636,10 +643,6 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
636643
vsock->event_run = true;
637644
mutex_unlock(&vsock->event_lock);
638645

639-
if (virtio_has_feature(vdev, VIRTIO_VSOCK_F_SEQPACKET))
640-
vsock->seqpacket_allow = true;
641-
642-
vdev->priv = vsock;
643646
rcu_assign_pointer(the_virtio_vsock, vsock);
644647

645648
mutex_unlock(&the_virtio_vsock_mutex);

0 commit comments

Comments
 (0)