> When connect() is scheduled out awaiting TCP_SYN_SENT -> TCP_ESTABLISHED,
> socket may already transition TCP_ESTABLISHED -> TCP_CLOSING
> (VIRTIO_VSOCK_OP_RST) or have sk_err set (VIRTIO_VSOCK_OP_RW). Short
> circuit the logic; do not assume a non-zero sk_err signifies a failed
> connect. connect() should return the status of connection attempt itself,
> not what followed.
>
> Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
> Reported-by: Hyunwoo Kim <[email protected]>
> Link: https://lore.kernel.org/netdev/anzT1fREOSyHT99k@v4bel/
> Signed-off-by: Michal Luczaj <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=5