summaryrefslogtreecommitdiff
path: root/rust/helpers/vmalloc.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-01-10 16:50:41 -0800
committerSean Christopherson <seanjc@google.com>2025-02-12 09:02:42 -0800
commitfd546aba1967bb05ddb569272f56abb75f604bd7 (patch)
tree013dbfc1a9a650a98c4e3077342f086b48b24357 /rust/helpers/vmalloc.c
parentdae7d81e8d5819bb47d63918c98539d9666a45d1 (diff)
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 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions