From: David Miller Subject: Re: [PATCH] vhost/vsock: fix reset orphans race with close timeout Date: Sat, 08 Dec 2018 21:25:44 -0800 (PST) Message-ID: <20181208.212544.2143955201045780777.davem@davemloft.net> References: <20181206191434.15448-1-stefanha@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mst@redhat.com, netdev@vger.kernel.org, riemensberger@cadami.net, graham.whaley@gmail.com To: stefanha@redhat.com Return-path: In-Reply-To: <20181206191434.15448-1-stefanha@redhat.com> Sender: netdev-owner@vger.kernel.org List-Id: kvm.vger.kernel.org From: Stefan Hajnoczi Date: Thu, 6 Dec 2018 19:14:34 +0000 > 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 > Cc: Graham Whaley > Signed-off-by: Stefan Hajnoczi Michael please review, and let me know if you want me to apply this directly and queue it up for -stable.