Re: [PATCH v34 10/24] mm: Add vm_ops->mprotect()
From: Jarkko Sakkinen
Date: Tue Jul 07 2020 - 00:04:10 EST
On Tue, Jul 07, 2020 at 04:14:24AM +0100, Matthew Wilcox wrote:
> On Tue, Jul 07, 2020 at 06:01:50AM +0300, Jarkko Sakkinen wrote:
> > +++ b/mm/mprotect.c
> > @@ -603,13 +603,20 @@ static int do_mprotect_pkey(unsigned long start, size_t len,
> > goto out;
> > }
> >
> > + tmp = vma->vm_end;
> > + if (tmp > end)
> > + tmp = end;
> > +
> > error = security_file_mprotect(vma, reqprot, prot);
> > if (error)
> > goto out;
> >
> > - tmp = vma->vm_end;
> > - if (tmp > end)
> > - tmp = end;
>
> You don't need to move this any more, right?
My bad.
/Jarkko