Skip to content

Commit b2c9204

Browse files
JasonXinggregkh
authored andcommitted
tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog
[ Upstream commit 9a79c65 ] Since commit 099ecf5 ("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 <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Stable-dep-of: 3479c75 ("tcp/dccp: allow a connection when sk_max_ack_backlog is zero") Signed-off-by: Sasha Levin <[email protected]>
1 parent 41d2e3b commit b2c9204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/inet_connection_sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk)
282282

283283
static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
284284
{
285-
return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
285+
return inet_csk_reqsk_queue_len(sk) >= READ_ONCE(sk->sk_max_ack_backlog);
286286
}
287287

288288
bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);

0 commit comments

Comments
 (0)