Files
linux/net/ipv4
WANG Cong ef13840028 tcp: reset sk_rx_dst in tcp_disconnect()
commit d747a7a51b upstream.

We have to reset the sk->sk_rx_dst when we disconnect a TCP
connection, because otherwise when we re-connect it this
dst reference is simply overridden in tcp_finish_connect().

This fixes a dst leak which leads to a loopback dev refcnt
leak. It is a long-standing bug, Kevin reported a very similar
(if not same) bug before. Thanks to Andrei for providing such
a reliable reproducer which greatly narrows down the problem.

Fixes: 41063e9dd1 ("ipv4: Early TCP socket demux.")
Reported-by: Andrei Vagin <avagin@gmail.com>
Reported-by: Kevin Xu <kaiwen.xu@hulu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-21 07:42:17 +02:00
..
2017-06-14 15:05:52 +02:00
2015-08-25 13:38:50 -07:00
2017-06-17 06:41:50 +02:00
2016-10-20 14:32:22 -04:00
2016-10-20 14:32:22 -04:00
2017-07-05 14:40:15 +02:00
2016-04-27 22:48:23 -04:00
2016-09-21 00:23:01 -04:00
2017-05-03 08:36:34 -07:00
2016-09-21 00:23:01 -04:00
2017-03-22 12:43:34 +01:00
2017-05-14 14:00:21 +02:00
2016-09-01 14:09:01 -07:00
2016-06-10 23:07:49 -07:00
2017-06-17 06:41:49 +02:00
2016-09-21 00:23:00 -04:00
2017-07-21 07:42:17 +02:00
2016-10-20 14:32:22 -04:00
2016-11-24 15:32:14 -05:00
2015-09-17 17:18:37 -07:00