Revision c38f57da428b033f2721b611d84b1f40bde674a8 authored by Stefan Hajnoczi on 06 December 2018, 19:14:34 UTC, committed by Michael S. Tsirkin on 06 December 2018, 19:22:34 UTC
If a local process has closed a connected socket and hasn't received a
RST packet yet, then the socket remains in the table until a timeout
expires.

When a vhost_vsock instance is released with the timeout still pending,
the socket is never freed because vhost_vsock has already set the
SOCK_DONE flag.

Check if the close timer is pending and let it close the socket.  This
prevents the race which can leak sockets.

Reported-by: Maximilian Riemensberger <riemensberger@cadami.net>
Cc: Graham Whaley <graham.whaley@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 2595646
History
File Mode Size
Kconfig -rw-r--r-- 685 bytes
Makefile -rw-r--r-- 402 bytes
channel.c -rw-r--r-- 25.9 KB
channel_mgmt.c -rw-r--r-- 33.6 KB
connection.c -rw-r--r-- 12.1 KB
hv.c -rw-r--r-- 11.4 KB
hv_balloon.c -rw-r--r-- 43.5 KB
hv_fcopy.c -rw-r--r-- 9.9 KB
hv_kvp.c -rw-r--r-- 20.0 KB
hv_snapshot.c -rw-r--r-- 10.2 KB
hv_trace.c -rw-r--r-- 114 bytes
hv_trace.h -rw-r--r-- 9.9 KB
hv_trace_balloon.h -rw-r--r-- 1.6 KB
hv_util.c -rw-r--r-- 14.0 KB
hv_utils_transport.c -rw-r--r-- 8.0 KB
hv_utils_transport.h -rw-r--r-- 2.1 KB
hyperv_vmbus.h -rw-r--r-- 10.6 KB
ring_buffer.c -rw-r--r-- 15.6 KB
vmbus_drv.c -rw-r--r-- 50.2 KB

back to top