diff --git a/mm/memory.c b/mm/memory.c index 20a2e9ed4aeb..57b271108bdc 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3567,6 +3567,12 @@ static vm_fault_t do_wp_page(struct vm_fault *vmf) return 0; } copy: + if ((vmf->flags & FAULT_FLAG_VMA_LOCK) && !vma->anon_vma) { + pte_unmap_unlock(vmf->pte, vmf->ptl); + vma_end_read(vmf->vma); + return VM_FAULT_RETRY; + } + /* * Ok, we need to copy. Oh, well.. */