From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>,
linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, virtualization@lists.linux.dev,
alex@shazbot.org, den@openvz.org, khorenko@virtuozzo.com
Subject: Re: [PATCH 0/1] vfio: fix KVM reference leak on QEMU CPR
Date: Fri, 20 Nov 2026 17:52:09 +0100 [thread overview]
Message-ID: <1075a283-b745-418b-b49a-2dfd41faba3b@redhat.com> (raw)
In-Reply-To: <20261120154730.882393-1-andrey.drobyshev@virtuozzo.com>
On 11/20/26 16:47, Andrey Drobyshev wrote:
> When a VM has a VFIO device and QEMU does a CPR (CheckPoint and Restart)
> live update, QEMU creates a new VM and keeps the device open. The
> device holds a reference to the VM it was opened with, so the old VM is
> not destroyed. It stays until the device is closed, which usually means
> for as long as the guest runs.
>
> It is one stale VM, not one per update. It is also visible: after
> cpr-exec the kernel logs "kvm: debugfs: duplicate directory <pid>-<fd>",
> and the new VM gets no debugfs directory.
>
> This patch makes the device take that reference only if its driver uses
> it.
There are two problems with this patch:
1) It sweeps the bug under the carpet and only solves the case that
*you* care about. If the device keeps a reference to the VM it was
first bound to, the problem is that there's no handoff from the old file
descriptor to the new one.
2) Even worse, the above text is 101% copied from Claude.
Please come back once you have a patch that works for everyone and
anyway only after having read Documentation/process/generated-content.rst:
"You are expected to understand and to be able to defend
everything you submit. If you are unable to do so, then do not submit
the resulting changes. If you do so anyway, maintainers are entitled to
reject your series without detailed review."
Paolo
next prev parent reply other threads:[~2026-11-20 16:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 15:47 [PATCH 0/1] vfio: fix KVM reference leak on QEMU CPR Andrey Drobyshev
2026-11-20 15:47 ` [PATCH 1/1] vfio: Take the KVM reference only for drivers that read device->kvm Andrey Drobyshev
2026-11-20 15:55 ` sashiko-bot
2026-11-20 16:52 ` Paolo Bonzini [this message]
2026-11-20 18:54 ` [PATCH 0/1] vfio: fix KVM reference leak on QEMU CPR Jason Gunthorpe
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=1075a283-b745-418b-b49a-2dfd41faba3b@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex@shazbot.org \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=den@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.