vsock/vmci: use sk_acceptq_is_full() helper
Subsystems (5)
PATCH 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/vmci_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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 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]>
this blank line should be dropped
Quoted 21 lines
Signed-off-by Raf Dickson <[email protected]>---
net/vmw_vsock/vmci_transport.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)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
Thanks for the patch!
note: according to patchwork [1] you forgot to CC some maintainers, please be more careful next time :)
[1] https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
Quoted 6 lines · Luigi Leonardi
this blank line should be dropped
note: according to patchwork [1] you forgot to CC some maintainers, please be more careful next time :)
Reviewed-by Luigi Leonardi <[email protected]>
Thanks for the review! Fixed the blank line and will add the missing maintainers (horms, edumazet, kuba) in v2. Will send after the 24h window. Also tried get_maintainer.pl but it kept refusing to recognize the sparse checkout as a kernel tree -- lesson learned to check patchwork next time.
Raf
Quoted 11 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]>---
net/vmw_vsock/vmci_transport.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Thanks for this, what about fixing also hyperv_transport ?
Stefano
Quoted 17 lines
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 1 line · Stefano Garzarella
Thanks for this, what about fixing also
hyperv_transport?
nice spotting, hyperv_transport.c:326 has the same open-coded check. Will include it in v2 of this patch.
Raf
Jakub Kicinski
maintainerQuoted 2 lines · On Thu, 11 Jun 2026 09:58:22 +0200 Luigi Leonardi wrote:
note: according to patchwork [1] you forgot to CC some maintainers, please be more careful next time :)
Please focus your reviews on the code not patchwork checks.