From: Oleg Nesterov Date: Mon, 28 Apr 2014 15:03:00 +0000 (+0200) Subject: KVM: async_pf: change async_pf_execute() to use get_user_pages(tsk => NULL) X-Git-Tag: firefly_0821_release~3680^2~36^2~16^2^2~124 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4c158ade8e722cd59ba1a6d8ca46be8427c8ac90;p=firefly-linux-kernel-4.4.55.git KVM: async_pf: change async_pf_execute() to use get_user_pages(tsk => NULL) async_pf_execute() passes tsk == current to gup(), this is doesn't hurt but unnecessary and misleading. "tsk" is only used to account the number of faults and current is the random workqueue thread. Signed-off-by: Oleg Nesterov Suggested-by: Andrea Arcangeli Signed-off-by: Paolo Bonzini (cherry picked from commit e9545b9f8aeb63e05818e4b3250057260bc072aa) Signed-off-by: Christoffer Dall --- diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index cda703e512d3..d6a3d0993d88 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -81,7 +81,7 @@ static void async_pf_execute(struct work_struct *work) might_sleep(); down_read(&mm->mmap_sem); - get_user_pages(current, mm, addr, 1, 1, 0, NULL, NULL); + get_user_pages(NULL, mm, addr, 1, 1, 0, NULL, NULL); up_read(&mm->mmap_sem); kvm_async_page_present_sync(vcpu, apf);