summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorLorenzo Colitti2015-12-21 16:03:44 +0100
committerDavid S. Miller2015-12-22 22:01:47 +0100
commit2010b93e9317cc12acd20c4aed385af7f9d1681e (patch)
tree739641a02d6d007daf790d87500a662777e46616 /net/ipv4/tcp_ipv4.c
parentmlxsw: core: Allow to reset temperature history via hwmon interface (diff)
downloadkernel-qcow2-linux-2010b93e9317cc12acd20c4aed385af7f9d1681e.tar.gz
kernel-qcow2-linux-2010b93e9317cc12acd20c4aed385af7f9d1681e.tar.xz
kernel-qcow2-linux-2010b93e9317cc12acd20c4aed385af7f9d1681e.zip
net: tcp: deal with listen sockets properly in tcp_abort.
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> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
0 files changed, 0 insertions, 0 deletions