[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1385979718-26218-1-git-send-email-yizhouzhou@ict.ac.cn>
Date: Mon, 2 Dec 2013 18:21:58 +0800
From: Zhouyi Zhou <zhouzhouyi@...il.com>
To: <linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
<kvm-ppc@...r.kernel.org>, Alexander Graf <agraf@...e.de>,
<paulus@...ba.org>
Cc: Zhouyi Zhou <yizhouzhou@....ac.cn>
Subject: [PATCH] KVM: 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@....ac.cn>
---
arch/powerpc/kvm/book3s_32_mmu_host.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c
index 3a0abd2..5fac89d 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' : '-',
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists