From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] vhost/vsock: fix reset orphans race with close timeout Date: Sun, 9 Dec 2018 09:28:58 -0500 Message-ID: <20181209092731-mutt-send-email-mst@kernel.org> References: <20181206191434.15448-1-stefanha@redhat.com> <20181208.212544.2143955201045780777.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: stefanha@redhat.com, kvm@vger.kernel.org, netdev@vger.kernel.org, riemensberger@cadami.net, graham.whaley@gmail.com To: David Miller Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58492 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbeLIO3C (ORCPT ); Sun, 9 Dec 2018 09:29:02 -0500 Content-Disposition: inline In-Reply-To: <20181208.212544.2143955201045780777.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Dec 08, 2018 at 09:25:44PM -0800, David Miller wrote: > 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. I sent this to Linus already.