KVM: async_pf: change async_pf_execute() to use get_user_pages(tsk => NULL)
authorOleg Nesterov <oleg@redhat.com>
Mon, 28 Apr 2014 15:03:00 +0000 (17:03 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 28 Apr 2014 15:24:55 +0000 (17:24 +0200)
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 <oleg@redhat.com>
Suggested-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/async_pf.c

index 0ced4f31bc65d97ea3a298ec78ee094d86f63646..62f4223f4c9ec4eccfcbe901b06cd2124ed281f1 100644 (file)
@@ -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);