Re: [PATCH] KVM: Remove the kvm debugfs directory if kvm_init() fails
From: Huang, Kai
Date: Fri Aug 07 2026 - 18:46:44 EST
> >
> > 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@xxxxxxxxxx
Do we need to "Cc: stable"? The one in your tree (commit db3a46e200df2) doesn't
have that.