]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: tcp_tx_timestamp() must look at the rtx queue
authorEric Dumazet <edumazet@google.com>
Tue, 27 Jan 2026 12:38:27 +0000 (12:38 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Jan 2026 03:35:35 +0000 (19:35 -0800)
commit838eb9687691d29915797a885b861fd09353386e
tree474e719a984e86f2aa2da25607b94f3487b281a3
parent5b71de34b7eaef7e39a7c3c4b9f2fdad06462ebb
tcp: tcp_tx_timestamp() must look at the rtx queue

tcp_tx_timestamp() is only called at the end of tcp_sendmsg_locked()
before the final tcp_push().

By the time it is called, it is possible all the copied data
has been sent already (transmit queue is empty).

If this is the case, use the last skb in the rtx queue.

Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20260127123828.4098577-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c