From: Sean Christopherson <seanjc@google.com>
To: Gokul K <gokul02k@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: selftests: Fix two VMs leaked on early returns
Date: Mon, 10 Aug 2026 06:35:40 -0700 [thread overview]
Message-ID: <annTrPQhUpbbX7ib@google.com> (raw)
In-Reply-To: <20260808081050.408657-1-gokul02k@gmail.com>
On Sat, Aug 08, 2026, Gokul K wrote:
> Two x86 selftests create a VM and then take an early return that skips the
> kvm_vm_free() at the end of the function.
>
> Patch 1 is the plain-SEV path of sev_smoke_test(), which returns straight
> out of the UCALL_DONE case instead of leaving the loop. The SEV-ES path
> next to it breaks out and frees correctly.
>
> Patch 2 is nx_huge_pages_test, which returns as soon as it has confirmed
> that disabling NX huge pages is denied without CAP_SYS_BOOT. This one is
> not an unusual error path: nx_huge_pages_test.sh runs the test without
> CAP_SYS_BOOT for any non-root user, so a normal run always takes it.
>
> Neither leak causes a failure today, since the process exits shortly
> afterwards. They do mean those paths never exercise VM teardown.
Eh, not really, they just exercise VM teardown at a different point in the
processes' lifecycle.
prev parent reply other threads:[~2026-08-10 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 8:10 [PATCH 0/2] KVM: selftests: Fix two VMs leaked on early returns Gokul K
2026-08-08 8:10 ` [PATCH 1/2] KVM: selftests: Free the VM when the SEV smoke test's guest completes Gokul K
2026-08-08 8:10 ` [PATCH 2/2] KVM: selftests: Free the VM when NX hugepage disabling is denied Gokul K
2026-08-10 13:37 ` Sean Christopherson
2026-08-10 13:35 ` Sean Christopherson [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=annTrPQhUpbbX7ib@google.com \
--to=seanjc@google.com \
--cc=gokul02k@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.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.