On Thu, Nov 12, 2026 at 11:34:49AM +0100, Michal Luczaj wrote:
> On 11/4/26 02:53, Bobby Eshleman wrote:
>
> > +/* Avoid breaking the socket when another thread has changed its
> > sock->state
> > + * while we were asleep.
> > + */
> > +static void vsock_connect_close(struct socket *sock)
> > +{
> > + sock->sk->sk_state = TCP_CLOSE;
> > + if (sock->state == SS_CONNECTING)
> > + sock->state = SS_UNCONNECTED;
> > +}
> > +
>
> It'd be nice to have it as a separate commit. If I'm not mistaken, this
> itself solved the vsock_connect() vs. transport reset
> (vhost_vsock_reset_orphans(), virtio_vsock_reset_sock(),
> vmci_transport_handle_detach()) races. And those were already reported a
> couple of times, including a recent NIPA/Sashiko Severity-Medium[1].
>
> [1]:
> https://lore.kernel.org/netdev/[email protected]/
>
> thanks,
> Michal
>
That's fair, will break out on its own.
Thanks,
Bobby