Thread (4 messages) 4 messages, 4 authors, 2020-01-31

Re: [PATCH net] tcp: clear tp->delivered in tcp_disconnect()

From: Soheil Hassas Yeganeh <hidden>
Date: 2020-01-31 18:41:52

On Fri, Jan 31, 2020 at 1:32 PM Neal Cardwell [off-list ref] wrote:
On Fri, Jan 31, 2020 at 1:22 PM Eric Dumazet [off-list ref] wrote:
quoted
tp->delivered needs to be cleared in tcp_disconnect().

tcp_disconnect() is rarely used, but it is worth fixing it.

Fixes: ddf1af6fa00e ("tcp: new delivery accounting")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <redacted>
Cc: Neal Cardwell <ncardwell@google.com>
---
 net/ipv4/tcp.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index dd57f1e3618160c1e51d6ff54afa984292614e5c..a8ffdfb61f422228d4af1de600b756c9d3894ef5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2622,6 +2622,7 @@ int tcp_disconnect(struct sock *sk, int flags)
        tp->snd_cwnd = TCP_INIT_CWND;
        tp->snd_cwnd_cnt = 0;
        tp->window_clamp = 0;
+       tp->delivered = 0;
        tp->delivered_ce = 0;
        tcp_set_ca_state(sk, TCP_CA_Open);
        tp->is_sack_reneg = 0;
--
Thanks, Eric!

Acked-by: Neal Cardwell <ncardwell@google.com>

neal
Acked-by: Soheil Hassas Yeganeh <redacted>

Nice catch! Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help