From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v2 0/2] vfio, KVM: kvm reference leak and debugfs clash on live update
Date: Thu, 05 Nov 2026 13:54:22 +0100 [thread overview]
Message-ID: <179388326205.2823727.6822264109965139869.b4-review@b4> (raw)
In-Reply-To: <20261105121733.643754-1-andrey.drobyshev@virtuozzo.com>
I won't apply this version, please send v3 with the changes below.
On Thu, 5 Nov 2026 14:17:31 +0200, Andrey Drobyshev wrote:
> Patch 1 takes that reference only for the drivers that read
> device->kvm. Patch 2 removes the debugfs directory when the VM's fd
> is released.
Patch 1 is right in the code now, thanks. What to change for v3:
1. Patch 1, code comment and commit message: the three drivers read
device->kvm in open_device(), not after it, and vfio_ap reads it
only there. Say also that device->kvm stays NULL for a driver
without the flag, not only that no reference is taken.
2. Patch 1, commit message: say how you checked that nvidia-vgpu-vfio
does not read device->kvm.
3. Patch 2: test patch 1 alone. With it, nothing should keep the old
VM alive across cpr-exec on your setup, so the duplicate directory
should be gone too. If it is, drop patch 2. If it is not, the
message has to name what still holds the VM, since "VFIO keeps a
reference" is no longer true for your driver.
4. Patch 2, code, if it stays: rename the directory with
debugfs_change_name() to a name that cannot clash, instead of
removing it. Removing it opens a use-after-free on powerpc. A
rename also keeps STATS_PATH and the vcpu stats, so the "Two things
change" paragraph goes away.
5. Both patches: drop "Assisted-by: LLM" from the commits, since
2026-10-22 it goes only into the cover letter, as one line before
the sign-off.
6. Cover letter: single space after a period (three places), the
Assisted-by line, and the result of item 3. Say what "no
mismatches" compares, or drop it.
Details are in the replies to the patches.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-11-05 12:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 12:17 Andrey Drobyshev
2026-11-05 12:17 ` [Devel] [PATCH hci-8.1 1/2] vfio: take the kvm reference only for drivers that read device->kvm Andrey Drobyshev
2026-11-05 12:23 ` no-reply
2026-11-05 12:54 ` Konstantin Khorenko
2026-11-05 12:17 ` [Devel] [PATCH hci-8.1 2/2] KVM: remove the VM's debugfs directory when its fd is released Andrey Drobyshev
2026-11-05 12:24 ` no-reply
2026-11-05 12:54 ` Konstantin Khorenko
2026-11-05 12:54 ` Konstantin Khorenko [this message]
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=179388326205.2823727.6822264109965139869.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=andrey.drobyshev@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.