All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
To: andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v3 0/2] drivers/vhost/blk: add support for worker ioctls
Date: Sun, 15 Nov 2026 14:39:55 +0100	[thread overview]
Message-ID: <20261115133957.2803273-1-alexander.ivanov@virtuozzo.com> (raw)

vhost-blk gets the mainstream worker ioctls, so userspace can move from
our VHOST_SET_NWORKERS to them. Until it does, both interfaces live on
the same device, and the workers VHOST_SET_NWORKERS installs are not
counted in attachment_cnt: VHOST_FREE_WORKER can free a worker a vq
still uses.

Patch 1 attaches the VHOST_SET_NWORKERS workers with
__vhost_vq_attach_worker(), so VHOST_FREE_WORKER refuses to free them.
Patch 2 wires the worker ioctls into vhost-blk.

v3:
- patch 1: skip a source vq whose worker was killed, reject
  VHOST_SET_NWORKERS on devices that do not use workers (vhost-vdpa),
  add the Fixes tag
- patch 2: unchanged

v2:
- patch 1: new, keeps VHOST_SET_NWORKERS safe next to the worker ioctls
- patch 2: unchanged

https://virtuozzo.atlassian.net/browse/VSTOR-107537

Alexander Ivanov (2):
  drivers/vhost: fix a use-after-free of VHOST_SET_NWORKERS workers
  drivers/vhost/blk: add support for worker ioctls

 drivers/vhost/blk.c   |  8 ++++++++
 drivers/vhost/vhost.c | 11 ++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.53.0

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

             reply	other threads:[~2026-11-15 13:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 13:39 Alexander Ivanov [this message]
2026-11-15 13:39 ` [Devel] [PATCH hci-8.1 v3 1/2] drivers/vhost: fix a use-after-free of VHOST_SET_NWORKERS workers Alexander Ivanov
2026-11-15 13:50   ` no-reply
2026-11-16  8:42     ` Alexander Ivanov
2026-11-15 13:39 ` [Devel] [PATCH hci-8.1 v3 2/2] drivers/vhost/blk: add support for worker ioctls Alexander Ivanov
2026-11-15 13:45   ` no-reply

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=20261115133957.2803273-1-alexander.ivanov@virtuozzo.com \
    --to=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 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.