On Tue, Jul 25, 2023 at 11:57:22PM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit a52f58b34afe095ebc5823684eb264404dad6f7b > Author: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > Date: Mon Jul 24 18:54:10 2023 +0000 > > mm: handle faults that merely update the accessed bit under the VMA lock > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1783585ea80000 > start commit: [unknown] > git tree: linux-next #syz test linux-next a52f58b34afe095ebc5823684eb264404dad6f7b 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.. */