Thread (1 message) 1 message, 1 author, 2026-08-31

[PATCH AUTOSEL 6.18-5.10] vsock: use sk_acceptq_is_full() helper in all transports

COLD17d REVIEWED: 3 (2M)

From: Sasha Levin <sashal@kernel.org>
Date: 2026-08-31 13:44:26
Also in: linux-hyperv, linux-patches, lkml, netdev, stable
Subsystem: hyper-v/azure core and drivers, networking [general], the rest, vm sockets (af_vsock), vmware vsock vmci transport driver · Maintainers: "K. Y. Srinivasan", Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Stefano Garzarella, Bryan Tan, Vishnu Dasa

2 review trailers (1 from subsystem maintainers).

From: Raf Dickson <redacted>

[ Upstream commit 4ff2e84ff1b33d79fa0e3ae355ce4a334908ef9a ]

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.

Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Raf Dickson <redacted>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Luigi Leonardi <redacted>
Link: https://patch.msgid.link/20260612045842.122207-1-rafdog35@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

The background searches finished and match what the earlier analysis
already showed:

- **Commit hash search** (`git log --grep="use sk_acceptq_is_full"`): no
  matches. That patch is not in this v6.18.44 tree yet; the buggy `>=`
  checks are still in `hyperv_transport.c` and `vmci_transport.c`.
- **Author search** (Raf Dickson): only one vsock commit here —
  `ba9ad6015937a` (`vsock/vmci: fix sk_ack_backlog leak on failed
  handshake`). Nothing for the `sk_acceptq_is_full()` change.

That supports the **YES** backport verdict: the bug is present locally,
the fix is not, and it should apply cleanly as a 2-line change.

 net/vmw_vsock/hyperv_transport.c | 2 +-
 net/vmw_vsock/vmci_transport.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c
index 4da752b47b116..54c7f51f9145d 100644
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -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);
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 75bf643ff6faf..4f02a6f269cdb 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1002,7 +1002,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;
 	}
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help