summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorZhouyi Zhou <zhouzhouyi@gmail.com>2013-12-02 11:21:58 +0100
committerAlexander Graf <agraf@suse.de>2014-01-09 10:15:11 +0100
commit47d45d9f53a7c478fc83dff7b421cb4bc3ad9f94 (patch)
treeaa1c9bd15c3045184201d1dc573946653dafa3bd /arch
parentKVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state (diff)
downloadlinux-47d45d9f53a7c478fc83dff7b421cb4bc3ad9f94.tar.xz
linux-47d45d9f53a7c478fc83dff7b421cb4bc3ad9f94.zip
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kvm/book3s_32_mmu_host.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c
index 3a0abd2e5a15..5fac89dfe4cd 100644
--- a/arch/powerpc/kvm/book3s_32_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_32_mmu_host.c
@@ -243,6 +243,11 @@ next_pteg:
/* 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' : '-',