[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20151222.160223.1472844140629618186.davem@davemloft.net>
Date: Tue, 22 Dec 2015 16:02:23 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: lorenzo@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com, tom@...bertland.com
Subject: Re: [PATCH] net: tcp: deal with listen sockets properly in
tcp_abort.
From: Lorenzo Colitti <lorenzo@...gle.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@...il.com>
> Signed-off-by: Lorenzo Colitti <lorenzo@...gle.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists