diff options
| author | Stefano Garzarella <sgarzare@redhat.com> | 2026-05-18 11:06:55 +0200 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-05-21 13:14:01 +0200 |
| commit | a4f0b001782b21663d10df983b4b208195bec66c (patch) | |
| tree | 3afb04bd6efd90546eb00a55e77a88f4f5961838 /tools/testing/shared/linux/kernel.h | |
| parent | 0377bd2722c1891754cde2bc41de21bc34c50d6c (diff) | |
vsock/virtio: reset connection on receiving queue overflow
When there is no more space to queue an incoming packet, the packet is
silently dropped. This causes data loss without any notification to
either peer, since there is no retransmission.
Under normal circumstances, this should never happen. However, it could
happen if the other peer doesn't respect the credit, or if the skb
overhead, which we recently began to take into account with commit
059b7dbd20a6 ("vsock/virtio: fix potential unbounded skb queue"),
is too high.
Fix this by resetting the connection and setting the local socket error
to ENOBUFS when virtio_transport_recv_enqueue() can no longer queue a
packet, so both peers are explicitly notified of the failure rather than
silently losing data.
Fixes: ae6fcfbf5f03 ("vsock/virtio: discard packets if credit is not respected")
Cc: stable@vger.kernel.org
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20260518090656.134588-2-sgarzare@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/shared/linux/kernel.h')
0 files changed, 0 insertions, 0 deletions
