Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virt: guest_memfd: fix reference leak on hwpoisoned page
If kvm_gmem_get_pfn() detects an hwpoisoned page, it returns -EHWPOISON but it does not put back the reference that kvm_gmem_get_folio() had grabbed. Add the forgotten folio_put(). Fixes: a7800aa ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory") Cc: [email protected] Reviewed-by: Liam Merwick <[email protected]> Reviewed-by: Isaku Yamahata <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
- Loading branch information