Home
last modified time | relevance | path

Searched hist:c38f57da (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/vhost/
H A Dvsock.cc38f57da Thu Dec 06 13:14:34 CST 2018 Stefan Hajnoczi <stefanha@redhat.com> vhost/vsock: fix reset orphans race with close timeout

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>