diff --git a/mm/memory.c b/mm/memory.c index 0f780a8dfaef..78d5312c0078 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3500,6 +3500,12 @@ reuse: return wp_page_shared(vmf); } 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.. */