]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - virt/kvm/async_pf.c
Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-fixes
[mirror_ubuntu-artful-kernel.git] / virt / kvm / async_pf.c
index f0d061f92674c674803720a0cadfdc04df8a4a0c..db9668869f6ff6866a72f278def5770d71190994 100644 (file)
@@ -79,7 +79,13 @@ static void async_pf_execute(struct work_struct *work)
 
        might_sleep();
 
-       get_user_pages_unlocked(NULL, mm, addr, 1, 1, 0, NULL);
+       /*
+        * This work is run asynchromously to the task which owns
+        * mm and might be done in another context, so we must
+        * use FOLL_REMOTE.
+        */
+       __get_user_pages_unlocked(NULL, mm, addr, 1, 1, 0, NULL, FOLL_REMOTE);
+
        kvm_async_page_present_sync(vcpu, apf);
 
        spin_lock(&vcpu->async_pf.lock);