Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jerome Mohm" <jrmmhm.kernel@eldare.de>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net v6 2/2] vsock/bpf: release sock lock while waiting for data in recvmsg
Date: Sat, 14 Nov 2026 12:24:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-214503@kernel.org> (raw)
In-Reply-To: <20261114-kbh3-1-022-fix-v2-v6-2-96b6029bbffa@eldare.de>

> From: Jerome Mohm <jrmmhm.kernel@eldare.de>
> 
> vsock_bpf_recvmsg() sleeps in vsock_msg_wait_data() with the socket lock
> held, so the virtio delivery worker, which needs that lock, deadlocks
> with the reader and all vsock rx on that worker stops.
> 
> Release the lock around the wait. The reader can then wake without
> data, so the wait also has to loop; the fix needs both halves. The loop
> ends on data, the timeout, a signal (the sleep returns at once while
> one is pending), a lost transport after a failed connect(), or a state
> in which __vsock_recvmsg() would not wait. Those states go to
> __vsock_recvmsg(), so a non-blocking read now sees them before -EAGAIN.
> A blocking read interrupted by a signal now gets -EINTR, or restarts,
> instead of -EAGAIN. One tested difference remains: a reader asleep at a
> virtio transport reset gets -ENOTCONN, where a native socket gets
> [ ... ]
> 
> Fixes: 634f1a7110b4 ("vsock: support sockmap")
> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jerome Mohm <jrmmhm.kernel@eldare.de>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261114-kbh3-1-022-fix-v2-v6-0-96b6029bbffa@eldare.de?part=2


  reply	other threads:[~2026-11-14 12:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 11:59 [PATCH net v6 0/2] vsock/bpf: fix recvmsg deadlock and zero-length, OOB, errqueue reads Jerome Mohm via B4 Relay
2026-11-14 11:59 ` [PATCH net v6 1/2] vsock/bpf: fix zero-length, MSG_OOB and MSG_ERRQUEUE reads Jerome Mohm via B4 Relay
2026-11-14 12:24   ` sashiko-bot
2026-11-14 11:59 ` [PATCH net v6 2/2] vsock/bpf: release sock lock while waiting for data in recvmsg Jerome Mohm via B4 Relay
2026-11-14 12:24   ` sashiko-bot [this message]
2026-11-14 18:50 ` [PATCH net v6 0/2] vsock/bpf: fix recvmsg deadlock and zero-length, OOB, errqueue reads Alexei Starovoitov

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=sashiko-outbox-214503@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=jrmmhm.kernel@eldare.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox