ibmvnic: Fix missing brackets in init_sub_crq_irqs
[cascardo/linux.git] / virt / kvm / async_pf.c
index f0d061f..db96688 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);