aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-04-28 17:03:00 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-04-28 17:24:55 +0200
commite9545b9f8aeb63e05818e4b3250057260bc072aa (patch)
treef89d5a69691b0f61871604aa2b09ce140d236cc8 /virt
parentKVM: async_pf: kill the unnecessary use_mm/unuse_mm async_pf_execute() (diff)
downloadlinux-dev-e9545b9f8aeb63e05818e4b3250057260bc072aa.tar.xz
linux-dev-e9545b9f8aeb63e05818e4b3250057260bc072aa.zip
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 <oleg@redhat.com> Suggested-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/async_pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index 0ced4f31bc65..62f4223f4c9e 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);