]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix TCP_REPAIR xmit queue setup
authorEric Dumazet <edumazet@google.com>
Thu, 18 Oct 2018 16:12:19 +0000 (09:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2018 23:51:02 +0000 (16:51 -0700)
commit9faf44d36d52f2058780ba257d0f196b097a573b
treee4d0a3a96f8109c5a0aaf295a31bdfffc611622f
parent622750efdb9c44fabf5a4daebff24f16f8360259
tcp: fix TCP_REPAIR xmit queue setup

Andrey reported the following warning triggered while running CRIU tests:

tcp_clean_rtx_queue()
...
last_ackt = tcp_skb_timestamp_us(skb);
WARN_ON_ONCE(last_ackt == 0);

This is caused by 5b17d7fe50a0 ("tcp: do not change tcp_wstamp_ns
in tcp_mstamp_refresh"), as we end up having skbs in retransmit queue
with a zero skb->skb_mstamp_ns field.

We could fix this bug in different ways, like making sure
tp->tcp_wstamp_ns is not zero at socket creation, but as Neal pointed
out, we also do not want that pacing status of a repaired socket
could push tp->tcp_wstamp_ns far ahead in the future.

So we prefer changing tcp_write_xmit() to not call tcp_update_skb_after_send()
and instead do what is requested by TCP_REPAIR logic.

Fixes: 5b17d7fe50a0 ("tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c