On Tue, Jan 12, 2010 at 03:21:45PM -0800, Chris Wright wrote:
> * Gleb Natapov ([email protected]) wrote:
> >  v3->v4
> >   - return error if MAP_LOCKED | MAP_UNLOCKED is specified
> ...
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -962,6 +962,12 @@ unsigned long do_mmap_pgoff(struct file *file, 
> > unsigned long addr,
> >             if (!can_do_mlock())
> >                     return -EPERM;
> >  
> > +        if (flags & MAP_UNLOCKED)
> > +                vm_flags &= ~VM_LOCKED;
> > +
> > +        if (flags & MAP_UNLOCKED)
> > +                vm_flags &= ~VM_LOCKED;
> > +
> >     /* mlock MCL_FUTURE? */
> >     if (vm_flags & VM_LOCKED) {
> >             unsigned long locked, lock_limit;
> 
> Looks like same patch applied twice rather than adding the
> (MAP_LOCKED | MAP_UNLOCKED) check.
> 
Thanks Chris, will resend.

--
                        Gleb.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to