vsock/vmci: use sk_acceptq_is_full() helper
Subsystems (6)
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
@@ -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
@@ -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
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 commit64a146513f8f("[NET]: Revert incorrect accept queue backlog changes."), and addsREAD_ONCE()for proper memory ordering.Suggested-by Stefano Garzarella <[email protected]>Signed-off-by Raf Dickson <[email protected]>---
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@@ -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@@ -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
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.
Reviewed-by Stefano Garzarella <[email protected]>
Thanks! Will wait a few days and resend with the corrected title if it hasn't been queued by then.
Raf
Jakub Kicinski
maintainerQuoted 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!
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 commit64a146513f8f("[NET]: Revert incorrect accept queue backlog changes."), and addsREAD_ONCE()for proper memory ordering.Suggested-by Stefano Garzarella <[email protected]>Signed-off-by Raf Dickson <[email protected]>
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 commit64a146513f8f("[NET]: Revert incorrect accept queue backlog changes."), and addsREAD_ONCE()for proper memory ordering.Suggested-by Stefano Garzarella <[email protected]>Signed-off-by Raf Dickson <[email protected]>[...]
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