Re: [PATCH] LoongArch: mm: try VMA lock-based page fault handling first
From: Wentao Guan
Date: Sun Sep 28 2025 - 10:47:07 EST
Hello Huacai,
Thanks for your review, I will fixed in V2.
> > + if (write) {
> > + flags |= FAULT_FLAG_WRITE;
> > + if (!(vma->vm_flags & VM_WRITE)) {
> > + vma_end_read(vma);
> > + si_code = SEGV_ACCERR;
> Need count_vm_vma_lock_event(VMA_LOCK_SUCCESS) here.
Ok, I forget it.
> > + goto bad_area_nosemaphore;
> > + }
> > + } else {
> > + if (!(vma->vm_flags & VM_EXEC) && address == exception_era(regs)){
> > + vma_end_read(vma);
> > + si_code = SEGV_ACCERR;
> The same.
Ok.
> > + goto bad_area_nosemaphore;
> > + }
> > + if (!(vma->vm_flags & (VM_READ | VM_WRITE)) && address != exception_era(regs)){
> > + vma_end_read(vma);
> > + si_code = SEGV_ACCERR;
>The same.
Ok.
> >
> > mmap_read_unlock(mm);
> > +done:
> > We need error handling here.
Ok.
Best Regards
Wentao Guan