Skip to contentSkip to conversation

vsock/vmci: use sk_acceptq_is_full() helper

PATCH Applied Raf Dickson 5 participants 6 messages Jun 12 – Jun 13

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

PATCH v2 1/1 vsock/vmci: use sk_acceptq_is_full() helper

Replace the open-coded backlog check with sk_acceptq_is_full(). The helper uses > instead of >=, which is the correct comparison per commit 64a146513f8f ("[NET]: Revert incorrect accept queue backlog changes."), and adds READ_ONCE() for proper memory ordering.

---
 net/vmw_vsock/hyperv_transport.c | 2 +-
 net/vmw_vsock/vmci_transport.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/vmw_vsock/hyperv_transport.c +1 -1
index b3394946b2..e6adbc4701 100644
@@ -323,7 +323,7 @@ static void hvs_open_connection(struct vmbus_channel *chan)
 		goto out;
 
 	if (conn_from_host) {
-		if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog)
+		if (sk_acceptq_is_full(sk))
 			goto out;
 
 		new = vsock_create_connected(sk);
net/vmw_vsock/vmci_transport.c +1 -1
index 91516488a7..56503bee31 100644
@@ -1010,7 +1010,7 @@ static int vmci_transport_recv_listen(struct sock *sk,
 	 * reset.  Otherwise we create and initialize a child socket and reply
 	 * with a connection negotiation.
 	 */
-	if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog) {
+	if (sk_acceptq_is_full(sk)) {
 		vmci_transport_reply_reset(pkt);
 		return -ECONNREFUSED;
 	}
Signature · 1 line
2.54.0
maintainer Reviewed-by on v2 1/1
#1 lore raw

On Fri, Jun 12, 2026 at 04:58:42AM +0000, Raf Dickson wrote:

nit: title should be updated since now this is not just vmci (e.g. vsock: use sk_acceptq_is_full() helper in all transports)

Not sure if it can be fixed while applying by netdev maintainers. Wait a bit and in case this is not queued, resend with the title fixed.

Quoted 11 lines

Replace the open-coded backlog check with sk_acceptq_is_full(). The helper uses > instead of >=, which is the correct comparison per commit 64a146513f8f ("[NET]: Revert incorrect accept queue backlog changes."), and adds READ_ONCE() for proper memory ordering.

---
net/vmw_vsock/hyperv_transport.c | 2 +-
net/vmw_vsock/vmci_transport.c | 2 +-

2 files changed, 2 insertions(+), 2 deletions(-)

That said, the patch LGTM:

Quoted 30 lines
net/vmw_vsock/hyperv_transport.c +1 -1
index b3394946b2..e6adbc4701 100644
@@ -323,7 +323,7 @@ static void hvs_open_connection(struct vmbus_channel *chan)
 		goto out;
 
 	if (conn_from_host) {
-		if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog)
+		if (sk_acceptq_is_full(sk))
 			goto out;
 
 		new = vsock_create_connected(sk);
net/vmw_vsock/vmci_transport.c +1 -1
index 91516488a7..56503bee31 100644
@@ -1010,7 +1010,7 @@ static int vmci_transport_recv_listen(struct sock *sk,
 	 * reset.  Otherwise we create and initialize a child socket and reply
 	 * with a connection negotiation.
 	 */
-	if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog) {
+	if (sk_acceptq_is_full(sk)) {
 		vmci_transport_reply_reset(pkt);
 		return -ECONNREFUSED;
 	}
Signature · 1 line
2.54.0
#2 lore raw
Quoted 3 lines · Stefano Garzarella

nit: title should be updated since now this is not just vmci Wait a bit and in case this is not queued, resend with the title fixed.

Thanks! Will wait a few days and resend with the corrected title if it hasn't been queued by then.

Raf

maintainer
#3 lore raw
In reply to Stefano Garzarella
Quoted 4 lines · On Fri, 12 Jun 2026 11:03:24 +0200 Stefano Garzarella wrote:

nit: title should be updated since now this is not just vmci (e.g. vsock: use sk_acceptq_is_full() helper in all transports)

Not sure if it can be fixed while applying by netdev maintainers.

Updated and applied, thanks!

Reviewed-by on v2 1/1
#4 lore raw
In reply to Raf Dickson
Quoted 7 lines · Raf Dickson

Replace the open-coded backlog check with sk_acceptq_is_full(). The helper uses > instead of >=, which is the correct comparison per commit 64a146513f8f ("[NET]: Revert incorrect accept queue backlog changes."), and adds READ_ONCE() for proper memory ordering.

#5 lore raw
In reply to Raf Dickson
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 9 lines · On Fri, 12 Jun 2026 04:58:42 +0000 you wrote:

Replace the open-coded backlog check with sk_acceptq_is_full(). The helper uses > instead of >=, which is the correct comparison per commit 64a146513f8f ("[NET]: Revert incorrect accept queue backlog changes."), and adds READ_ONCE() for proper memory ordering.

[...]

Here is the summary with links:
- [net-next,v2] vsock/vmci: use sk_acceptq_is_full() helper

    https://git.kernel.org/netdev/net-next/c/4ff2e84ff1b3

You are awesome, thank you!

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