Re: [PATCH] net: tcp: deal with listen sockets properly in tcp_abort.

2015-12-22 Thread David Miller
From: Lorenzo Colitti 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, causi

Re: [PATCH] net: tcp: deal with listen sockets properly in tcp_abort.

2015-12-21 Thread Eric Dumazet
On Tue, 2015-12-22 at 00:03 +0900, Lorenzo Colitti wrote: > 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

[PATCH] net: tcp: deal with listen sockets properly in tcp_abort.

2015-12-21 Thread Lorenzo Colitti
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 call