]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - virt/kvm/async_pf.c
KVM: do not release the error page
[mirror_ubuntu-artful-kernel.git] / virt / kvm / async_pf.c
index 56f553391896ea03d602b0034eb42cd4d576b4e2..ea475cd035112a9db93ffa028a552df9be0724af 100644 (file)
@@ -111,7 +111,7 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu)
                        list_entry(vcpu->async_pf.done.next,
                                   typeof(*work), link);
                list_del(&work->link);
-               if (work->page)
+               if (!is_error_page(work->page))
                        kvm_release_page_clean(work->page);
                kmem_cache_free(async_pf_cache, work);
        }
@@ -138,7 +138,7 @@ void kvm_check_async_pf_completion(struct kvm_vcpu *vcpu)
 
                list_del(&work->queue);
                vcpu->async_pf.queued--;
-               if (work->page)
+               if (!is_error_page(work->page))
                        kvm_release_page_clean(work->page);
                kmem_cache_free(async_pf_cache, work);
        }