diff options
| author | Eric Dumazet <edumazet@google.com> | 2026-04-16 20:03:09 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-18 11:10:12 -0700 |
| commit | fd571afb05ebaeac5d8f09460a0640d4cf6755f8 (patch) | |
| tree | dbfe0a9d41419d731bfa11ed8d1a1428cbab70fb /net/core | |
| parent | 829ba1f329cb7cbd56d599a6d225997fba66dc32 (diff) | |
| download | lwn-fd571afb05ebaeac5d8f09460a0640d4cf6755f8.tar.gz lwn-fd571afb05ebaeac5d8f09460a0640d4cf6755f8.zip | |
tcp: annotate data-races around tp->snd_ssthresh
tcp_get_timestamping_opt_stats() intentionally runs lockless, we must
add READ_ONCE() and WRITE_ONCE() annotations to keep KCSAN happy.
Fixes: 7156d194a077 ("tcp: add snd_ssthresh stat in SCM_TIMESTAMPING_OPT_STATS")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260416200319.3608680-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index fcfcb72663ca..3b5609fb96de 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -5396,7 +5396,7 @@ static int bpf_sol_tcp_setsockopt(struct sock *sk, int optname, if (val <= 0) return -EINVAL; tp->snd_cwnd_clamp = val; - tp->snd_ssthresh = val; + WRITE_ONCE(tp->snd_ssthresh, val); break; case TCP_BPF_DELACK_MAX: timeout = usecs_to_jiffies(val); |
