OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2] Revert "drivers/vhost: add ioctl to increase the number of workers"
Date: Mon, 30 Nov 2026 16:30:20 +0100	[thread overview]
Message-ID: <179605262006.1088513.14812449765597436342.b4-review@b4> (raw)
In-Reply-To: <20261126081646.863702-1-alexander.ivanov@virtuozzo.com>

Applying with these fixes on my side:

- message: name b3ed783d6715 next to 705a4b3eefde in the "This
  reverts commit" line;
- message: -ENOTTY, or -ENOBUFS when the argument is not a valid vq
  index;
- message: name the QEMU version that has the worker ioctls,
  v10.1.0-20.vz10.33.

On Thu, 26 Nov 2026 09:16:46 +0100, Alexander Ivanov wrote:
> This reverts commit 705a4b3eefde336713aaa0b84b1b74e69dcdef30.

The diff also reverts b3ed783d6715 ("drivers/vhost: fix a
use-after-free of VHOST_SET_NWORKERS workers"): the removed lines with
__vhost_vq_attach_worker() and !d->use_worker come from it, and a plain
"git revert 705a4b3eefde" does not give this diff. Without its name a
later rebase keeps b3ed783d6715 with a Fixes: pointing to a dropped
commit.

> The 0x1F ioctl number is freed: VHOST_SET_NWORKERS now fails with
> -ENOTTY.

vhost_dev_ioctl() returns -ENOIOCTLCMD, and vhost_vring_ioctl() then
reads the int argument as a vq index: 32 or more on vhost-blk gives
-ENOBUFS. QEMU fails either way, so only the errno was off.

> mainstream worker ioctls" in QEMU) before this kernel ships.

The QEMU commit is 3b0b744f6c4 on hci-dev, first in
v10.1.0-20.vz10.33; with the version in the message packaging can
require it.

Separate patches, not needed for this patch. I created a task:

1. hci-8.1 still has 705a4b3eefde without b3ed783d6715, and its QEMU
   still uses VHOST_SET_NWORKERS, so this revert does not fit there.
   The owner of a vhost-scsi device can free a worker installed by
   VHOST_SET_NWORKERS with VHOST_FREE_WORKER while a vq still uses
   it: attachment_cnt is 0. b3ed783d6715 wants a backport to hci-8.1.
   https://virtuozzo.atlassian.net/browse/VSTOR-157358

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

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

  parent reply	other threads:[~2026-11-30 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  8:16 Alexander Ivanov
2026-11-26 11:34 ` Andrey Zhadchenko
2026-11-30 15:30 ` Konstantin Khorenko [this message]
2026-11-30 15:41   ` Konstantin Khorenko
2026-11-30 15:45 ` Konstantin Khorenko

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=179605262006.1088513.14812449765597436342.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=alexander.ivanov@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