summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-04-04 11:42:31 +0000
committerJakub Kicinski <kuba@kernel.org>2024-04-05 22:32:37 -0700
commitf410cbea9f3d2675b4c8e52af1d1985b11b387d1 (patch)
treee407bf74e04719f2aadbec9acd9ac32501fe67b0 /net/ipv6
parent571faefe09f5aae894c4373179569fbc2c2a3114 (diff)
downloadlinux-f410cbea9f3d2675b4c8e52af1d1985b11b387d1.tar.gz
linux-f410cbea9f3d2675b4c8e52af1d1985b11b387d1.tar.bz2
linux-f410cbea9f3d2675b4c8e52af1d1985b11b387d1.zip
tcp: annotate data-races around tp->window_clamp
tp->window_clamp can be read locklessly, add READ_ONCE() and WRITE_ONCE() annotations. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Link: https://lore.kernel.org/r/20240404114231.2195171-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/syncookies.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 6d8286c299c9..bfad1e89b6a6 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -246,7 +246,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
}
}
- req->rsk_window_clamp = tp->window_clamp ? :dst_metric(dst, RTAX_WINDOW);
+ req->rsk_window_clamp = READ_ONCE(tp->window_clamp) ? :dst_metric(dst, RTAX_WINDOW);
/* limit the window selection if the user enforce a smaller rx buffer */
full_space = tcp_full_space(sk);
if (sk->sk_userlocks & SOCK_RCVBUF_LOCK &&