summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-19 21:28:57 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-27 08:57:05 +0200
commit4a6ebe88cd96f2ce7f020bb9bd5460eefa6a5a8e (patch)
treef6adf46d0be012f5242f9464cab4abfeb05a2e34 /include
parenta1d2126fcb962ac9cb0146099c5e5da3c983601c (diff)
downloadlinux-stable-4a6ebe88cd96f2ce7f020bb9bd5460eefa6a5a8e.tar.gz
linux-stable-4a6ebe88cd96f2ce7f020bb9bd5460eefa6a5a8e.tar.bz2
linux-stable-4a6ebe88cd96f2ce7f020bb9bd5460eefa6a5a8e.zip
tcp: annotate data-races around fastopenq.max_qlen
[ Upstream commit 70f360dd7042cb843635ece9d28335a4addff9eb ] This field can be read locklessly. Fixes: 1536e2857bd3 ("tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its listner") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20230719212857.3943972-12-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index b4c08ac86983..91a37c99ba66 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -513,7 +513,7 @@ static inline void fastopen_queue_tune(struct sock *sk, int backlog)
struct request_sock_queue *queue = &inet_csk(sk)->icsk_accept_queue;
int somaxconn = READ_ONCE(sock_net(sk)->core.sysctl_somaxconn);
- queue->fastopenq.max_qlen = min_t(unsigned int, backlog, somaxconn);
+ WRITE_ONCE(queue->fastopenq.max_qlen, min_t(unsigned int, backlog, somaxconn));
}
static inline void tcp_move_syn(struct tcp_sock *tp,