diff options
| author | 2025-01-10 16:50:41 -0800 | |
|---|---|---|
| committer | 2025-02-12 09:02:42 -0800 | |
| commit | fd546aba1967bb05ddb569272f56abb75f604bd7 (patch) | |
| tree | 013dbfc1a9a650a98c4e3077342f086b48b24357 /scripts/basic/git:/ssh:/git@git.zx2c4.com | |
| parent | KVM: selftests: Allow running a single iteration of dirty_log_test (diff) | |
| download | wireguard-linux-fd546aba1967bb05ddb569272f56abb75f604bd7.tar.xz wireguard-linux-fd546aba1967bb05ddb569272f56abb75f604bd7.zip | |
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 'scripts/basic/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
