From: David Miller <davem@davemloft.net>
To: stefanha@redhat.com
Cc: kvm@vger.kernel.org, mst@redhat.com, netdev@vger.kernel.org,
riemensberger@cadami.net, graham.whaley@gmail.com
Subject: Re: [PATCH] vhost/vsock: fix reset orphans race with close timeout
Date: Sat, 08 Dec 2018 21:25:44 -0800 (PST) [thread overview]
Message-ID: <20181208.212544.2143955201045780777.davem@davemloft.net> (raw)
In-Reply-To: <20181206191434.15448-1-stefanha@redhat.com>
From: Stefan Hajnoczi <stefanha@redhat.com>
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 <riemensberger@cadami.net>
> Cc: Graham Whaley <graham.whaley@gmail.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Michael please review, and let me know if you want me to apply this
directly and queue it up for -stable.
next prev parent reply other threads:[~2018-12-09 5:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 19:14 [PATCH] vhost/vsock: fix reset orphans race with close timeout Stefan Hajnoczi
2018-12-09 5:25 ` David Miller [this message]
2018-12-09 14:28 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181208.212544.2143955201045780777.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=graham.whaley@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=riemensberger@cadami.net \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).