Skip to content
Commit 53b08c49 authored by Alexandru Matei's avatar Alexandru Matei Committed by Jakub Kicinski
Browse files

vsock/virtio: initialize the_virtio_vsock before using VQs



Once VQs are filled with empty buffers and we kick the host, it can send
connection requests. If the_virtio_vsock is not initialized before,
replies are silently dropped and do not reach the host.

virtio_transport_send_pkt() can queue packets once the_virtio_vsock is
set, but they won't be processed until vsock->tx_run is set to true. We
queue vsock->send_pkt_work when initialization finishes to send those
packets queued earlier.

Fixes: 0deab087 ("vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock")
Signed-off-by: default avatarAlexandru Matei <alexandru.matei@uipath.com>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20231024191742.14259-1-alexandru.matei@uipath.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1711435e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment