diff options
| author | leixiang <leixiang@kylinos.cn> | 2026-07-06 17:59:06 +0800 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-07-08 13:41:15 -0700 |
| commit | b31e7c24b475128de7d685c294c34c09ff802258 (patch) | |
| tree | 74d6bdb13a170a42acf3082b17fd8e5f7243bebe /tools/perf/scripts/python/task-analyzer.py | |
| parent | 09dd4de361dcb60a4097a4483d0203954c9755c3 (diff) | |
KVM: Remove kvm_debugfs_dir on kvm_init() error paths
kvm_init_debug() runs before several steps that can fail
(kvm_vfio_ops_init(), kvm_gmem_init(), kvm_init_virtualization() and
misc_register()), but none of the corresponding error labels remove the
"kvm" debugfs directory. Any failure after kvm_init_debug() therefore
leaks the directory and its stat files for the lifetime of the boot.
kvm_exit() already calls debugfs_remove_recursive(kvm_debugfs_dir); add
the same at the err_vfio label, whose fall-through covers every path
taken after kvm_init_debug().
Fixes: 2b0128127373 ("KVM: Register /dev/kvm as the _very_ last thing during initialization")
Signed-off-by: leixiang <leixiang@kylinos.cn>
Link: https://patch.msgid.link/20260706095910.39798-1-leixiang@kylinos.cn
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
