All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Chris Wright <chrisw@sous-sol.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH v4][RESENT] add MAP_UNLOCKED mmap flag
Date: Wed, 13 Jan 2010 11:28:49 +0200	[thread overview]
Message-ID: <20100113092849.GS7549@redhat.com> (raw)
In-Reply-To: <20100112232145.GA10576@sequoia.sous-sol.org>

On Tue, Jan 12, 2010 at 03:21:45PM -0800, Chris Wright wrote:
> * Gleb Natapov (gleb@redhat.com) 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Gleb Natapov <gleb@redhat.com>
To: Chris Wright <chrisw@sous-sol.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH v4][RESENT] add MAP_UNLOCKED mmap flag
Date: Wed, 13 Jan 2010 11:28:49 +0200	[thread overview]
Message-ID: <20100113092849.GS7549@redhat.com> (raw)
In-Reply-To: <20100112232145.GA10576@sequoia.sous-sol.org>

On Tue, Jan 12, 2010 at 03:21:45PM -0800, Chris Wright wrote:
> * Gleb Natapov (gleb@redhat.com) 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.

  reply	other threads:[~2010-01-13  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 14:51 [PATCH v4][RESENT] add MAP_UNLOCKED mmap flag Gleb Natapov
2010-01-12 14:51 ` Gleb Natapov
2010-01-12 23:21 ` Chris Wright
2010-01-12 23:21   ` Chris Wright
2010-01-13  9:28   ` Gleb Natapov [this message]
2010-01-13  9:28     ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100113092849.GS7549@redhat.com \
    --to=gleb@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.