summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-05-22 10:15:34 -0700
committerSean Christopherson <seanjc@google.com>2026-05-26 12:24:12 -0700
commit849d65e27bd62bca9a9383f7dfa14da711f4bebc (patch)
treefff51d65dbe7877d7e4ea56705fad02071e4d81d /tools/lib/python
parent2a3987540cab00c5b24a82ec6b4dc5d18e41e112 (diff)
KVM: selftests: Cast guest_memfd fd to a signed int when checking for >= 0
When conditionally closing a memory region's guest_memfd file descriptor, cast the field to a signed it so that negative values are correctly detected. Because selftests reuse "struct kvm_userspace_memory_region2" instead of providing custom storage, they pick up the kernel uAPI's __u32 definition of the file descriptor, not the more common "int" definition, e.g. that's used for userspace_mem_region.fd. Fixes: bb2968ad6c33 ("KVM: selftests: Add support for creating private memslots") Reported-by: Bibo Mao <maobibo@loongson.cn> Closes: https://lore.kernel.org/all/20260508015013.4108345-1-maobibo@loongson.cn Reviewed-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Ackerley Tng <ackerleytng@google.com> Link: https://patch.msgid.link/20260522171535.3525890-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions