WANG Cong d747a7a51b tcp: reset sk_rx_dst in tcp_disconnect()
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: 41063e9dd119 ("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>
2017-06-25 12:23:07 -04:00
..
2017-06-04 22:56:55 -04:00
2016-10-20 14:32:22 -04:00
2017-06-20 15:51:57 -04:00
2017-01-13 22:37:16 -05:00
2017-04-30 22:44:04 -04:00
2017-05-08 15:10:31 -04:00
2017-03-24 20:50:28 -07:00
2017-05-02 15:07:02 -04:00
2017-06-25 12:23:07 -04:00
2017-02-15 11:04:11 +01:00
2017-01-10 10:57:12 +01:00