Skip to contentSkip to conversation

Revert "net: correct sk_acceptq_is_full()"

PATCH Applied Eric Dumazet 2 participants 2 messages Mar 31, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "net: correct sk_acceptq_is_full()"

From: Eric Dumazet <[email protected]>

This reverts commit f211ac154577ec9ccf07c15f18a6abf0d9bdb4ab.

We had similar attempt in the past, and we reverted it.

History:

64a146513f8f12ba204b7bf5cb7e9505594ead42 [NET]: Revert incorrect accept queue backlog changes. 8488df894d05d6fa41c2bd298c335f944bb0e401 [NET]: Fix bugs in "Whether sock accept queue is full" checking

I am adding a fat comment so that future attempts will be much harder.

Fixes f211ac154577 ("net: correct sk_acceptq_is_full()")
Cc iuyacan <[email protected]>
---
 include/net/sock.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/net/sock.h +5 -1
index 3e3a5da2ce5aedbcfaca1880eb7c2e239c86b5ae..8487f58da36d21335f690edd2194986c3d4fed23 100644
@@ -934,9 +934,13 @@ static inline void sk_acceptq_added(struct sock *sk)
 	WRITE_ONCE(sk->sk_ack_backlog, sk->sk_ack_backlog + 1);
 }
 
+/* Note: If you think the test should be:
+ *	return READ_ONCE(sk->sk_ack_backlog) >= READ_ONCE(sk->sk_max_ack_backlog);
+ * Then please take a look at commit 64a146513f8f ("[NET]: Revert incorrect accept queue backlog changes.")
+ */
 static inline bool sk_acceptq_is_full(const struct sock *sk)
 {
-	return READ_ONCE(sk->sk_ack_backlog) >= READ_ONCE(sk->sk_max_ack_backlog);
+	return READ_ONCE(sk->sk_ack_backlog) > READ_ONCE(sk->sk_max_ack_backlog);
 }
 
 /*
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 9 lines · On Wed, 31 Mar 2021 09:35:12 -0700 you wrote:

From: Eric Dumazet <[email protected]>

This reverts commit f211ac154577ec9ccf07c15f18a6abf0d9bdb4ab.

We had similar attempt in the past, and we reverted it.

History:

[...]

Here is the summary with links:
- [net] Revert "net: correct sk_acceptq_is_full()"

    https://git.kernel.org/netdev/net/c/c609e6aae4ef

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html