From: Izik Eidus <[EMAIL PROTECTED]> Fix userspace memory handling bug related to cow the previous way we called get_user_pages, was without the force flag and therefore it didnt break COW shared pages. This caused host memory corruption when host userspace fork()ed.
Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 845beb2..a5ee518 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -470,7 +470,7 @@ static struct page *__gfn_to_page(struct kvm *kvm, gfn_t gfn) return bad_page; } - npages = get_user_pages(current, current->mm, addr, 1, 1, 0, page, + npages = get_user_pages(current, current->mm, addr, 1, 1, 1, page, NULL); if (npages != 1) { ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits