OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: andrey.zhadchenko@virtuozzo.com,
	Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 1/2] Revert "drivers/vhost: add ioctl to increase the number of workers"
Date: Tue, 27 Oct 2026 11:42:36 +0000	[thread overview]
Message-ID: <010701a17d2b5e2b-59ae21b0-bce8-4d81-9fbf-e1fd05be7406-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261027113830.2927925-2-alexander.ivanov@virtuozzo.com>

> This reverts commit 1491588e71dafc934c8d450ba36cc33bb0f990bd.
> 
> VHOST_SET_NWORKERS was a stopgap to run our userspace on the rh10
> kernel unchanged. Userspace should use the mainstream worker ioctls
> (VHOST_NEW_WORKER, VHOST_ATTACH_VRING_WORKER etc.) instead.
> 
> It is also unsafe next to those ioctls. vhost_set_workers() installs
> its workers into vq->worker bypassing __vhost_vq_attach_worker(), so
> their attachment_cnt stays 0. VHOST_FREE_WORKER then destroys such a
> worker while a virtqueue still points at it, and the next
> vhost_vq_work_queue() on that vq is a use-after-free. vhost-scsi
> exposes this to the device owner.
> 
> The 0x1F ioctl number is freed: VHOST_SET_NWORKERS now fails with
> -ENOTTY, so userspace that still issues it has to be updated
> together with this kernel.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-107537
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> 
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>

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

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261027113830.2927925-1-alexander.ivanov@virtuozzo.com?part=1


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-10-27 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 11:38 [Devel] [PATCH hci-8.1 0/2] vhost: replace VHOST_SET_NWORKERS with the mainstream worker ioctls Alexander Ivanov
2026-10-27 11:38 ` [Devel] [PATCH hci-8.1 1/2] Revert "drivers/vhost: add ioctl to increase the number of workers" Alexander Ivanov
2026-10-27 11:42   ` no-reply [this message]
2026-10-27 11:38 ` [Devel] [PATCH hci-8.1 2/2] drivers/vhost/blk: add support for worker ioctls Alexander Ivanov
2026-10-27 11:44   ` no-reply
2026-10-29 10:48 ` [Devel] [PATCH hci-8.1 0/2] vhost: replace VHOST_SET_NWORKERS with the mainstream " Alexander Ivanov

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=010701a17d2b5e2b-59ae21b0-bce8-4d81-9fbf-e1fd05be7406-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --cc=andrey.zhadchenko@virtuozzo.com \
    --cc=devel@openvz.org \
    /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