All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] vhost/vsock: Fix socket state constant
@ 2026-11-12 10:34 Michal Luczaj
  2026-11-12 10:36 ` netdev-bot+sinfo
  2026-11-13 10:34 ` sashiko-bot
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Luczaj @ 2026-11-12 10:34 UTC (permalink / raw)
  To: Stefan Hajnoczi, Stefano Garzarella, Bobby Eshleman,
	Michael S. Tsirkin, Jason Wang, Eugenio Pérez,
	David S. Miller
  Cc: kvm, virtualization, netdev, linux-kernel, Michal Luczaj

Refactor under Fixes missed one: SS_UNCONNECTED (1) -> TCP_CLOSE (7).
Until now, sk->sk_state = 1 stood for TCP_ESTABLISHED.

Fixes: 3b4477d2dcf2 ("VSOCK: use TCP state constants for sk_state")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
Salvaging a single already-reviewed patch from a series[1] that was
superseded.

[1]: https://lore.kernel.org/all/20260922-vsock-connect-reset-closing-v3-0-78907b8200d4@rbox.co/
---
 drivers/vhost/vsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 88a310390eb0..fd224f7681d9 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -789,7 +789,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk)
 
 	sock_set_flag(sk, SOCK_DONE);
 	vsk->peer_shutdown = SHUTDOWN_MASK;
-	sk->sk_state = SS_UNCONNECTED;
+	sk->sk_state = TCP_CLOSE;
 	sk->sk_err = ECONNRESET;
 	sk_error_report(sk);
 }

---
base-commit: 145480b28ca82e9fae789427cc4569e596515a32
change-id: 20261112-transport-reset-state-fix-42363b46d2a7

Best regards,
--  
Michal Luczaj <mhal@rbox.co>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-13 10:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 10:34 [PATCH net] vhost/vsock: Fix socket state constant Michal Luczaj
2026-11-12 10:36 ` netdev-bot+sinfo
2026-11-12 10:52   ` Michal Luczaj
2026-11-13  8:44     ` Michal Luczaj
2026-11-13 10:34 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.