Skip to contentSkip to conversation

tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog

PATCH Applied Jason Xing 3 participants 3 messages Mar 31, 2024 – Apr 3, 2024

Subsystems (2)
lore
Share & tools
lore

Jason Xing

author
#0 lore raw

PATCH 1/1 tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog

From: Jason Xing <[email protected]>

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:)

---
 include/net/inet_connection_sock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/inet_connection_sock.h +1 -1
index ccf171f7eb60..d94f787fdf40 100644
@@ -284,7 +284,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);
Signature · 1 line
2.37.3
#2 lore raw
In reply to Jason Xing
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Sun, 31 Mar 2024 17:05:21 +0800 you wrote:

From: Jason Xing <[email protected]>

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:)

[...]

Here is the summary with links:
- [net-next] tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog

    https://git.kernel.org/netdev/net-next/c/9a79c65f00e2

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html