linux-stable/net/vmw_vsock
Alexandru Matei 1f14ded0f1 vsock/virtio: initialize the_virtio_vsock before using VQs
commit 53b08c4985 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: 0deab087b1 ("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>
2023-11-02 09:35:23 +01:00
..
af_vsock.c vsock: avoid to close connected socket after the timeout 2023-05-24 17:32:44 +01:00
af_vsock_tap.c
diag.c
hyperv_transport.c hv_sock: disable SO_RCVLOWAT support 2022-08-23 10:43:11 +02:00
Kconfig
Makefile
virtio_transport.c vsock/virtio: initialize the_virtio_vsock before using VQs 2023-11-02 09:35:23 +01:00
virtio_transport_common.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
vmci_transport.c net: vmw_vsock: vmci: Check memcpy_from_msg() 2022-12-31 13:32:26 +01:00
vmci_transport.h
vmci_transport_notify.c vmci/vsock: check SO_RCVLOWAT before wake up reader 2022-08-23 10:43:12 +02:00
vmci_transport_notify.h
vmci_transport_notify_qstate.c vmci/vsock: check SO_RCVLOWAT before wake up reader 2022-08-23 10:43:12 +02:00
vsock_addr.c vsock_addr: Check for supported flag values 2020-12-14 19:33:39 -08:00
vsock_loopback.c vsock/loopback: enable SEQPACKET for transport 2021-06-11 13:32:47 -07:00