David Ahern d7226c7a4d net: diag: Fix refcnt leak in error path destroying socket
inet_diag_find_one_icsk takes a reference to a socket that is not
released if sock_diag_destroy returns an error. Fix by changing
tcp_diag_destroy to manage the refcnt for all cases and remove
the sock_put calls from tcp_abort.

Fixes: c1e64e298b8ca ("net: diag: Support destroying TCP sockets")
Reported-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-23 23:11:36 -07:00
..
2015-08-25 13:38:50 -07:00
2016-04-27 22:48:24 -04:00
2016-06-08 11:36:02 -07:00
2016-04-27 22:48:23 -04:00
2016-08-15 13:37:12 -07:00
2016-07-09 17:45:56 -04:00
2016-06-10 23:07:49 -07:00
2016-06-10 23:07:49 -07:00
2016-06-10 23:07:49 -07:00
2015-09-17 17:18:37 -07:00