summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2012-07-26 11:58:17 +0800
committerAvi Kivity <avi@redhat.com>2012-07-26 11:55:31 +0300
commit2b4b5af8f8e7296bc27c52023ab6bb8f53db3a2b (patch)
treefc0f1de2dc0c01a43cc45c85737b54953421f93c /virt
parent3b2bd2f800ba9488d9ad493216a0c07d71055b56 (diff)
downloadlwn-2b4b5af8f8e7296bc27c52023ab6bb8f53db3a2b.tar.gz
lwn-2b4b5af8f8e7296bc27c52023ab6bb8f53db3a2b.zip
KVM: use kvm_release_page_clean to release the page
In kvm_async_pf_wakeup_all, it uses bad_page to generate broadcast wakeup, and uses put_page to release bad_page, the work depends on the fact that bad_page is the normal page. But we will use the error code instead of bad_page, so use kvm_release_page_clean to release the page which will release the error code properly Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/async_pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index 74268b4c2ee1..ebae24b62c90 100644
--- a/virt/kvm/async_pf.c
+++ b/virt/kvm/async_pf.c
@@ -112,7 +112,7 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu)
typeof(*work), link);
list_del(&work->link);
if (work->page)
- put_page(work->page);
+ kvm_release_page_clean(work->page);
kmem_cache_free(async_pf_cache, work);
}
spin_unlock(&vcpu->async_pf.lock);
@@ -139,7 +139,7 @@ void kvm_check_async_pf_completion(struct kvm_vcpu *vcpu)
list_del(&work->queue);
vcpu->async_pf.queued--;
if (work->page)
- put_page(work->page);
+ kvm_release_page_clean(work->page);
kmem_cache_free(async_pf_cache, work);
}
}