netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lorenzo@google.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, tom@herbertland.com
Subject: Re: [PATCH] net: tcp: deal with listen sockets properly in tcp_abort.
Date: Tue, 22 Dec 2015 16:02:23 -0500 (EST)	[thread overview]
Message-ID: <20151222.160223.1472844140629618186.davem@davemloft.net> (raw)
In-Reply-To: <1450710224-91722-1-git-send-email-lorenzo@google.com>

From: Lorenzo Colitti <lorenzo@google.com>
Date: Tue, 22 Dec 2015 00:03:44 +0900

> When closing a listen socket, tcp_abort currently calls
> tcp_done without clearing the request queue. If the socket has a
> child socket that is established but not yet accepted, the child
> socket is then left without a parent, causing a leak.
> 
> Fix this by setting the socket state to TCP_CLOSE and calling
> inet_csk_listen_stop with the socket lock held, like tcp_close
> does.
> 
> Tested using net_test. With this patch, calling SOCK_DESTROY on a
> listen socket that has an established but not yet accepted child
> socket results in the parent and the child being closed, such
> that they no longer appear in sock_diag dumps.
> 
> Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Lorenzo Colitti <lorenzo@google.com>

Applied to net-next, which I assume is the intended target tree for
this patch.

Please make that explicit, always, in future submissions.

Thanks.

      parent reply	other threads:[~2015-12-22 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 15:03 [PATCH] net: tcp: deal with listen sockets properly in tcp_abort Lorenzo Colitti
2015-12-21 16:20 ` Eric Dumazet
2015-12-22 21:02 ` David Miller [this message]

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=20151222.160223.1472844140629618186.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=lorenzo@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.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).