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
ib.h -rw-r--r-- 3.3 KB
ib_addr.h -rw-r--r-- 8.9 KB
ib_cache.h -rw-r--r-- 5.1 KB
ib_cm.h -rw-r--r-- 19.3 KB
ib_fmr_pool.h -rw-r--r-- 3.4 KB
ib_hdrs.h -rw-r--r-- 8.6 KB
ib_mad.h -rw-r--r-- 29.2 KB
ib_marshall.h -rw-r--r-- 2.0 KB
ib_pack.h -rw-r--r-- 9.0 KB
ib_pma.h -rw-r--r-- 5.4 KB
ib_sa.h -rw-r--r-- 21.5 KB
ib_smi.h -rw-r--r-- 5.5 KB
ib_umem.h -rw-r--r-- 3.4 KB
ib_umem_odp.h -rw-r--r-- 5.4 KB
ib_verbs.h -rw-r--r-- 120.7 KB
iw_cm.h -rw-r--r-- 8.6 KB
iw_portmap.h -rw-r--r-- 7.5 KB
mr_pool.h -rw-r--r-- 954 bytes
opa_addr.h -rw-r--r-- 4.4 KB
opa_port_info.h -rw-r--r-- 14.8 KB
opa_smi.h -rw-r--r-- 4.3 KB
opa_vnic.h -rw-r--r-- 4.0 KB
rdma_cm.h -rw-r--r-- 15.0 KB
rdma_cm_ib.h -rw-r--r-- 2.1 KB
rdma_netlink.h -rw-r--r-- 3.3 KB
rdma_vt.h -rw-r--r-- 17.0 KB
rdmavt_cq.h -rw-r--r-- 3.4 KB
rdmavt_mr.h -rw-r--r-- 6.0 KB
rdmavt_qp.h -rw-r--r-- 21.6 KB
restrack.h -rw-r--r-- 4.7 KB
rw.h -rw-r--r-- 2.8 KB
uverbs_ioctl.h -rw-r--r-- 23.2 KB
uverbs_named_ioctl.h -rw-r--r-- 6.4 KB
uverbs_std_types.h -rw-r--r-- 6.2 KB
uverbs_types.h -rw-r--r-- 6.4 KB

back to top