diff options
author | Sean Christopherson <seanjc@google.com> | 2025-01-11 03:50:41 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2025-02-12 20:02:42 +0300 |
commit | fd546aba1967bb05ddb569272f56abb75f604bd7 (patch) | |
tree | 013dbfc1a9a650a98c4e3077342f086b48b24357 /tools/perf/scripts/python/task-analyzer.py | |
parent | dae7d81e8d5819bb47d63918c98539d9666a45d1 (diff) | |
download | linux-fd546aba1967bb05ddb569272f56abb75f604bd7.tar.xz |
KVM: selftests: Fix mostly theoretical leak of VM's binary stats FD
When allocating and freeing a VM's cached binary stats info, check for a
NULL descriptor, not a '0' file descriptor, as '0' is a legal FD. E.g. in
the unlikely scenario the kernel installs the stats FD at entry '0',
selftests would reallocate on the next __vm_get_stat() and/or fail to free
the stats in kvm_vm_free().
Fixes: 83f6e109f562 ("KVM: selftests: Cache binary stats metadata for duration of test")
Link: https://lore.kernel.org/r/20250111005049.1247555-2-seanjc@google.com
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