Skip to content

Commit 17b7dba

Browse files
sean-jcbonzini
authored andcommitted
KVM: PPC: Remove extra get_page() to fix page refcount leak
Don't manually do get_page() when patching dcbz, as gfn_to_page() gifts the caller a reference. I.e. doing get_page() will leak the page due to not putting all references. Signed-off-by: Sean Christopherson <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Message-ID: <[email protected]>
1 parent 7e8f1aa commit 17b7dba

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/powerpc/kvm/book3s_pr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ static void kvmppc_patch_dcbz(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte)
652652
hpage_offset &= ~0xFFFULL;
653653
hpage_offset /= 4;
654654

655-
get_page(hpage);
656655
page = kmap_atomic(hpage);
657656

658657
/* patch dcbz into reserved instruction, so we trap */

0 commit comments

Comments
 (0)