tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog
[ Upstream commit9a79c65f00] Since commit099ecf59f0("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> Stable-dep-of:3479c7549f("tcp/dccp: allow a connection when sk_max_ack_backlog is zero") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e67fff8fd1
commit
bcd1557f1d
@@ -278,7 +278,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);
|
||||
|
||||
Reference in New Issue
Block a user