]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp: address problems caused by EDT misshaps
authorEric Dumazet <edumazet@google.com>
Sat, 24 Nov 2018 17:12:24 +0000 (09:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:31:19 +0000 (15:31 +0200)
commiteb6eeb056c992d20a4d3b4fb7dd05471ba32fea3
tree07be0bdc801b92a0f40439c6e8e2acac95b75623
parent9f94fc13c94810db7fc0335b03f2590757d27f0d
tcp: address problems caused by EDT misshaps

commit 9efdda4e3abed13f0903b7b6e4d4c2102019440a upstream.

When a qdisc setup including pacing FQ is dismantled and recreated,
some TCP packets are sent earlier than instructed by TCP stack.

TCP can be fooled when ACK comes back, because the following
operation can return a negative value.

    tcp_time_stamp(tp) - tp->rx_opt.rcv_tsecr;

Some paths in TCP stack were not dealing properly with this,
this patch addresses four of them.

Fixes: ab408b6dc744 ("tcp: switch tcp and sch_fq to new earliest departure time model")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp_input.c
net/ipv4/tcp_timer.c