All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michal Luczaj" <mhal@rbox.co>
Cc: virtualization@lists.linux.dev,
	"Eugenio Perez" <eperezma@redhat.com>,
	kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH net v4] vsock: treat TCP_CLOSING as once-established
Date: Mon, 05 Oct 2026 01:07:59 +0000	[thread overview]
Message-ID: <20261005010759.920121F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005-vsock-connect-reset-closing-v4-1-15d41cfda3ed@rbox.co>

> Handle the TCP_ESTABLISHED -> TCP_CLOSING transition on OP_RST, which can
> race with the connect loop. Immediately break and return 0 on
> ESTABLISHED/CLOSING. The return value of connect() should reflect what
> happened up to the point the connection was established or failed. Events
> that occur afterwards must not affect it. E.g. even if OP_RW has already
> set sk_err, connect() should still return 0, not ENOBUFS because of it.
> Adapt the inaccurate comment above signal_pending().
> 
> Resetting a socket that is still present in connected_table can lead to
> memory corruption. The reporter noted lost transports for in-flight skbs,
> and I have reproduced crashes caused by re-insertion into connected_table.
> 
>   list_add double add: new=, prev=, next=.
>   kernel BUG at lib/list_debug.c:35!
>   Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
> [ ... ]
> 
> Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
> Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
> Link: https://lore.kernel.org/netdev/anzT1fREOSyHT99k@v4bel/
> Signed-off-by: Michal Luczaj <mhal@rbox.co>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261005-vsock-connect-reset-closing-v4-1-15d41cfda3ed@rbox.co?part=1


  reply	other threads:[~2026-10-05  1:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  0:26 [PATCH net v4] vsock: fix connect() races Michal Luczaj
2026-10-05  0:26 ` [PATCH net v4] vsock: treat TCP_CLOSING as once-established Michal Luczaj
2026-10-05  1:07   ` sashiko-bot [this message]
2026-10-07  0:27   ` netdev-bot+sashiko
2026-10-07  9:24     ` Michal Luczaj
2026-10-09  9:44       ` Stefano Garzarella
2026-10-09 10:15   ` Stefano Garzarella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261005010759.920121F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mhal@rbox.co \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.