aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Xing <kernelxing@tencent.com>2024-03-31 17:05:21 +0800
committerJakub Kicinski <kuba@kernel.org>2024-04-02 18:21:13 -0700
commit9a79c65f00e2b036e17af3a3a607d7d732b7affb (patch)
tree2631a58b640620c582cab434ad3a57009134154f
parentf9a4506438a1068d9ff613319bc64dcaa65f681d (diff)
downloadipsec-next-9a79c65f00e2b036e17af3a3a607d7d732b7affb.tar.gz
tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog
Since commit 099ecf59f05b ("net: annotate lockless accesses to sk->sk_max_ack_backlog") decided to handle the sk_max_ack_backlog locklessly, there is one more function mostly called in TCP/DCCP cases. So this patch completes it:) Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20240331090521.71965-1-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--include/net/inet_connection_sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index d96c871b0d581b..20e7b0c0b3d123 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -281,7 +281,7 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk)
static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
{
- return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
+ return inet_csk_reqsk_queue_len(sk) >= READ_ONCE(sk->sk_max_ack_backlog);
}
bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);