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
davinci
drv-intf
i2c
tpg
cec-notifier.h -rw-r--r-- 4.2 KB
cec-pin.h -rw-r--r-- 2.6 KB
cec.h -rw-r--r-- 12.0 KB
demux.h -rw-r--r-- 22.7 KB
dmxdev.h -rw-r--r-- 5.9 KB
dvb-usb-ids.h -rw-r--r-- 17.7 KB
dvb_ca_en50221.h -rw-r--r-- 4.4 KB
dvb_demux.h -rw-r--r-- 10.8 KB
dvb_frontend.h -rw-r--r-- 30.0 KB
dvb_math.h -rw-r--r-- 1.8 KB
dvb_net.h -rw-r--r-- 2.3 KB
dvb_ringbuffer.h -rw-r--r-- 8.3 KB
dvb_vb2.h -rw-r--r-- 7.7 KB
dvbdev.h -rw-r--r-- 14.2 KB
imx.h -rw-r--r-- 396 bytes
media-device.h -rw-r--r-- 17.4 KB
media-devnode.h -rw-r--r-- 5.7 KB
media-entity.h -rw-r--r-- 36.2 KB
media-request.h -rw-r--r-- 12.0 KB
rc-core.h -rw-r--r-- 12.7 KB
rc-map.h -rw-r--r-- 12.5 KB
rcar-fcp.h -rw-r--r-- 1.1 KB
soc_camera.h -rw-r--r-- 13.0 KB
tuner-types.h -rw-r--r-- 7.5 KB
tuner.h -rw-r--r-- 8.8 KB
tveeprom.h -rw-r--r-- 3.3 KB
v4l2-async.h -rw-r--r-- 10.4 KB
v4l2-clk.h -rw-r--r-- 2.1 KB
v4l2-common.h -rw-r--r-- 13.5 KB
v4l2-ctrls.h -rw-r--r-- 44.0 KB
v4l2-dev.h -rw-r--r-- 15.6 KB
v4l2-device.h -rw-r--r-- 18.0 KB
v4l2-dv-timings.h -rw-r--r-- 9.1 KB
v4l2-event.h -rw-r--r-- 6.1 KB
v4l2-fh.h -rw-r--r-- 4.6 KB
v4l2-flash-led-class.h -rw-r--r-- 5.9 KB
v4l2-fwnode.h -rw-r--r-- 16.2 KB
v4l2-image-sizes.h -rw-r--r-- 864 bytes
v4l2-ioctl.h -rw-r--r-- 31.3 KB
v4l2-mc.h -rw-r--r-- 5.4 KB
v4l2-mediabus.h -rw-r--r-- 6.4 KB
v4l2-mem2mem.h -rw-r--r-- 20.8 KB
v4l2-rect.h -rw-r--r-- 5.2 KB
v4l2-subdev.h -rw-r--r-- 40.6 KB
videobuf-core.h -rw-r--r-- 7.0 KB
videobuf-dma-contig.h -rw-r--r-- 1.0 KB
videobuf-dma-sg.h -rw-r--r-- 2.9 KB
videobuf-vmalloc.h -rw-r--r-- 1.3 KB
videobuf2-core.h -rw-r--r-- 46.2 KB
videobuf2-dma-contig.h -rw-r--r-- 866 bytes
videobuf2-dma-sg.h -rw-r--r-- 696 bytes
videobuf2-dvb.h -rw-r--r-- 1.8 KB
videobuf2-memops.h -rw-r--r-- 1.1 KB
videobuf2-v4l2.h -rw-r--r-- 11.2 KB
videobuf2-vmalloc.h -rw-r--r-- 509 bytes
vsp1.h -rw-r--r-- 3.1 KB

back to top