mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: EAGAIN in do_mmap_pgoff() [2.6.7-rc1]
Date: Mon, 24 May 2004 13:36:55 -0700	[thread overview]
Message-ID: <20040524133655.L22989@build.pdx.osdl.net> (raw)
In-Reply-To: <20040524202121.GA28273@MAIL.13thfloor.at>; from herbert@13thfloor.at on Mon, May 24, 2004 at 10:21:21PM +0200

* Herbert Poetzl (herbert@13thfloor.at) wrote:
> 
> just a short question:
> 
> is -EAGAIN here really intentional? wouldn't -ENOMEM be better?
> 
> mm/mmap.c ~780 do_mmap_pgoff()
> 
>         /* mlock MCL_FUTURE? */
>         if (vm_flags & VM_LOCKED) {
>                 unsigned long locked = mm->locked_vm << PAGE_SHIFT;
>                 locked += len;
>                 if (locked > current->rlim[RLIMIT_MEMLOCK].rlim_cur)
>                         return -EAGAIN;
>         }

Standards require this one:

[EAGAIN]
	[ML] The mapping could not be locked in memory, if required by
	     mlockall(), due to a lack of resources.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

      reply	other threads:[~2004-05-24 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-24 20:21 Herbert Poetzl
2004-05-24 20:36 ` Chris Wright [this message]

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=20040524133655.L22989@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®