linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: mtk.manpages@gmail.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Jerome Marchand <jmarchan@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-man@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: [patch -man] madvise.2: Specify new ENOMEM return value
Date: Tue, 24 Jan 2017 14:32:17 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1701241431530.42507@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1701241431120.42507@chino.kir.corp.google.com>

madvise(2) may return ENOMEM if the advice acts on a vma that must be
split and creating the new vma will result in the process exceeding
/proc/sys/vm/max_map_count.

Specify this additional possibility.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 man2/madvise.2 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/man2/madvise.2 b/man2/madvise.2
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -467,7 +467,12 @@ Not enough memory: paging in failed.
 .TP
 .B ENOMEM
 Addresses in the specified range are not currently
-mapped, or are outside the address space of the process.
+mapped, are outside the address space of the process, or will result in the
+number of areas mapped by this process to exceed
+.I /proc/sys/vm/max_map_count
+(see the Linux kernel source file
+.I Documentation/sysctl/vm.txt
+for more details).
 .TP
 .B EPERM
 .I advice

--
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>

  reply	other threads:[~2017-01-24 22:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 22:32 [patch] mm, madvise: fail with ENOMEM when splitting vma will hit max_map_count David Rientjes
2017-01-24 22:32 ` David Rientjes [this message]
2017-01-25 10:30 ` Anshuman Khandual
2017-01-25 22:14   ` David Rientjes

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=alpine.DEB.2.10.1701241431530.42507@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=jmarchan@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtk.manpages@gmail.com \
    /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