* [PATCH RESEND] KVM: PPC: fix leakage of error page in kvmppc_patch_dcbz()
@ 2010-08-17 2:08 Wei Yongjun
2010-08-17 9:05 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2010-08-17 2:08 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Add kvm_release_page_clean() after is_error_page() to avoid
leakage of error page.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
arch/powerpc/kvm/book3s.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index eee97b5..7656b6d 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -455,8 +455,10 @@ static void kvmppc_patch_dcbz(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte)
int i;
hpage = gfn_to_page(vcpu->kvm, pte->raddr >> PAGE_SHIFT);
- if (is_error_page(hpage))
+ if (is_error_page(hpage)) {
+ kvm_release_page_clean(hpage);
return;
+ }
hpage_offset = pte->raddr & ~PAGE_MASK;
hpage_offset &= ~0xFFFULL;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-17 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 2:08 [PATCH RESEND] KVM: PPC: fix leakage of error page in kvmppc_patch_dcbz() Wei Yongjun
2010-08-17 9:05 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox