Re: [Patch net] tcp: reset sk_rx_dst in tcp_disconnect()

2017-07-05 Thread Cong Wang
On Tue, Jul 4, 2017 at 11:54 PM, Jamie Bainbridge wrote: > On 25 June 2017 at 16:50, Cong Wang wrote: >> 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(). >> >> Thi

Re: [Patch net] tcp: reset sk_rx_dst in tcp_disconnect()

2017-07-04 Thread Jamie Bainbridge
On 25 June 2017 at 16:50, Cong Wang wrote: > 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. I

Re: [Patch net] tcp: reset sk_rx_dst in tcp_disconnect()

2017-06-25 Thread David Miller
From: Cong Wang Date: Sat, 24 Jun 2017 23:50:30 -0700 > 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 ref

[Patch net] tcp: reset sk_rx_dst in tcp_disconnect()

2017-06-24 Thread Cong Wang
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