summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-19 21:28:57 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-11 11:45:27 +0200
commitcc4122c81d211307c7cd2ddf7455ee171d867983 (patch)
tree88de7db3559d90cdaaf0add14ae7f3182b4cce7b /include/linux
parent73e2b8a15ea42ccb2d4bcd26e55d4092a1a8e4e5 (diff)
downloadlinux-stable-cc4122c81d211307c7cd2ddf7455ee171d867983.tar.gz
linux-stable-cc4122c81d211307c7cd2ddf7455ee171d867983.tar.bz2
linux-stable-cc4122c81d211307c7cd2ddf7455ee171d867983.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/linux')
-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 621ab5a7fb8f..0d63a428e6f9 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -460,7 +460,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,