Skip to content

Commit

Permalink
KVM: PPC: NULL return of kvmppc_mmu_hpte_cache_next should be handled
Browse files Browse the repository at this point in the history
NULL return of kvmppc_mmu_hpte_cache_next should be handled

Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
Zhouyi Zhou authored and Alexander Graf committed Jan 9, 2014
1 parent 9bd880a commit 47d45d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/kvm/book3s_32_mmu_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte,
/* Now tell our Shadow PTE code about the new page */

pte = kvmppc_mmu_hpte_cache_next(vcpu);
if (!pte) {
kvm_release_pfn_clean(hpaddr >> PAGE_SHIFT);
r = -EAGAIN;
goto out;
}

dprintk_mmu("KVM: %c%c Map 0x%llx: [%lx] 0x%llx (0x%llx) -> %lx\n",
orig_pte->may_write ? 'w' : '-',
Expand Down

0 comments on commit 47d45d9

Please sign in to comment.