diff options
author | Alexandru Matei | 2023-10-24 22:17:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-11-02 09:35:23 +0100 |
commit | 1f14ded0f16596a77364f899eb5aeb3e90966218 (patch) | |
tree | 96187e43d25f63149832ee0c155823cfb6dc50a6 /drivers/vhost | |
parent | 534487cc3eb82a660704d554b9d5dd12aa1cc00a (diff) |
vsock/virtio: initialize the_virtio_vsock before using VQs
commit 53b08c4985158430fd6d035fb49443bada535210 upstream.
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: 0deab087b16a ("vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock")
Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20231024191742.14259-1-alexandru.matei@uipath.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vhost')
0 files changed, 0 insertions, 0 deletions