]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: annotate data-races in tcp_get_info_chrono_stats()
authorEric Dumazet <edumazet@google.com>
Thu, 16 Apr 2026 20:03:06 +0000 (20:03 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 18 Apr 2026 18:10:11 +0000 (11:10 -0700)
commit267bf3cf9a6f0ffb98b8afd983c1950e835f07c9
treee28fa60e43d0cebc1692e3d8917d36925c23301d
parent82c21069028c5db3463f851ae8ac9cc2e38a3827
tcp: annotate data-races in tcp_get_info_chrono_stats()

tcp_get_timestamping_opt_stats() does not own the socket lock,
this is intentional.

It calls tcp_get_info_chrono_stats() while other threads could
change chrono fields in tcp_chrono_set().

I do not think we need coherent TCP socket state snapshot
in tcp_get_timestamping_opt_stats(), I chose to only
add annotations to keep KCSAN happy.

Fixes: 1c885808e456 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260416200319.3608680-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp.c