Thread (25 messages) 25 messages, 3 authors, 3d ago

Re: [PATCH net v2 2/5] vsock/virtio: Streamline socket reset on transport/PM event

From: Stefano Garzarella <sgarzare@redhat.com>
Date: 2026-09-24 10:06:40
Also in: kvm, lkml, virtualization

On Tue, Sep 22, 2026 at 03:17:30PM +0200, Michal Luczaj wrote:
On 9/16/26 14:30, Stefano Garzarella wrote:
quoted
On Tue, Sep 15, 2026 at 03:15:13PM +0200, Michal Luczaj wrote:
quoted
Follow vhost's vhost_vsock_reset_orphans() and VMCI's
vmci_transport_handle_detach(): set SHUTDOWN_MASK, which will come handy
later in the series.
IMO it would be better to include the reason here as well. Every commit
should explain why doing a change.
Sure, will do.
quoted
quoted
static void virtio_vsock_reset_sock(struct sock *sk)
{
+	struct vsock_sock *vsk = vsock_sk(sk);
+
	/* vmci_transport.c doesn't take sk_lock here either.  At least we're
	 * under vsock_table_lock so the sock cannot disappear while we're
	 * executing.
	 */

+	vsk->peer_shutdown = SHUTDOWN_MASK;
In all other places we use WRITE_ONCE/READ_ONCE on vsk->peer_shutdown,
should we do the same here?
Right, we should. Isn't this also the case for sk_state and sk_err?
Are those read without the sk_lock?

Thanks,
Stefano
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help