From: Avi Kivity Date: Sat, 6 Jan 2007 00:36:49 +0000 (-0800) Subject: [PATCH] KVM: MMU: Ensure freed shadow pages are clean X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f1e0b6abcc100a79528387207adc3dd92aa5374;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] KVM: MMU: Ensure freed shadow pages are clean Signed-off-by: Avi Kivity Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index c55ce7d1509e..b9ba240144b7 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -318,6 +318,7 @@ static void kvm_mmu_free_page(struct kvm_vcpu *vcpu, hpa_t page_hpa) { struct kvm_mmu_page *page_head = page_header(page_hpa); + ASSERT(is_empty_shadow_page(page_hpa)); list_del(&page_head->link); page_head->page_hpa = page_hpa; list_add(&page_head->link, &vcpu->free_pages);