mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
KVM: PPC: NULL return of kvmppc_mmu_hpte_cache_next should be handled
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>
This commit is contained in:
parent
9bd880a2c8
commit
47d45d9f53
1 changed files with 5 additions and 0 deletions
|
@ -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 */
|
/* Now tell our Shadow PTE code about the new page */
|
||||||
|
|
||||||
pte = kvmppc_mmu_hpte_cache_next(vcpu);
|
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",
|
dprintk_mmu("KVM: %c%c Map 0x%llx: [%lx] 0x%llx (0x%llx) -> %lx\n",
|
||||||
orig_pte->may_write ? 'w' : '-',
|
orig_pte->may_write ? 'w' : '-',
|
||||||
|
|
Loading…
Reference in a new issue