aboutsummaryrefslogtreecommitdiff
path: root/include/linux/root_dev.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-12-20 02:39:43 +0900
committerMoyster <oysterized@gmail.com>2016-09-10 16:51:11 +0200
commit2efad8609aa23ebda29079f0c5a66ee2cd1c70af (patch)
tree8cc8053351446f18e2e7849b9176ccef392fad80 /include/linux/root_dev.h
parent0c9c7d44a6ec60a338ba161be217f7da8b9c8948 (diff)
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. [Backport of net-next 2010b93e9317cc12acd20c4aed385af7f9d1681e] Change-Id: I2b9c38fab194b3c4e11439047ead9582c811d4c2 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 'include/linux/root_dev.h')
0 files changed, 0 insertions, 0 deletions