From: Lorenzo Colitti <lore...@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.duma...@gmail.com> > Signed-off-by: Lorenzo Colitti <lore...@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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html