[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tencent_0699F58F055D10117355797A@qq.com>
Date: Sun, 28 Sep 2025 22:46:14 +0800
From: "Wentao Guan" <guanwentao@...ontech.com>
To: "Huacai Chen" <chenhuacai@...nel.org>
Cc: "WANG Xuerui" <kernel@...0n.name>, "linux-kernel" <linux-kernel@...r.kernel.org>, "loongarch" <loongarch@...ts.linux.dev>, "占俊" <zhanjun@...ontech.com>, "聂诚" <niecheng1@...ontech.com>
Subject: Re: [PATCH] LoongArch: mm: try VMA lock-based page fault handling first
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
Powered by blists - more mailing lists