The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Kai Huang <kai.huang@intel.com>
Cc: "zeng_chi911@163.com" <zeng_chi911@163.com>,
	"zengchi@kylinos.cn" <zengchi@kylinos.cn>,
	 "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	 "stable@vger.kernel.org" <stable@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: Remove the kvm debugfs directory if kvm_init() fails
Date: Fri, 7 Aug 2026 16:06:14 -0700	[thread overview]
Message-ID: <anZk5hTf6-8HWHBu@google.com> (raw)
In-Reply-To: <6bb4252cf3c41de5e58cce5c5de02660d8350f47.camel@intel.com>

On Fri, Aug 07, 2026, Kai Huang wrote:
> > > 
> > > The stale /sys/kernel/debug/kvm directory isn't just cosmetic: a
> > > subsequent attempt to load KVM makes debugfs_create_dir() fail with
> > > -EEXIST, after which kvm_debugfs_dir holds an ERR_PTR and all stat
> > > files are silently never created again.  Worse, the leaked stat files
> > > reference file_operations and stat data that live in the KVM module; if
> > > the module is unloaded after the failed initialization, reading the
> > > stale files is a use-after-free.
> > > 
> > > 
> 
> [...]
> 
> > 
> > Already posted (twice) and applied:
> > 
> > https://lore.kernel.org/all/20260706095910.39798-1-leixiang@kylinos.cn
> 
> Do we need to "Cc: stable"?  The one in your tree (commit db3a46e200df2) doesn't
> have that.

I was thinking "no", as I don't think it's likely to be problematic outside of
fuzzers and error injection, but I also wouldn't object if someone feels strongly
that it should be sent to LTS kernels.

      reply	other threads:[~2026-08-07 23:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  7:19 [PATCH] KVM: Remove the kvm debugfs directory if kvm_init() fails Zeng Chi
2026-08-07 14:11 ` Sean Christopherson
2026-08-07 22:46   ` Huang, Kai
2026-08-07 23:06     ` 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=anZk5hTf6-8HWHBu@google.com \
    --to=seanjc@google.com \
    --cc=kai.huang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=zeng_chi911@163.com \
    --cc=zengchi@kylinos.cn \
    /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