[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 4 Apr 2014 12:24:35 +0400
From: Andrey Vagin <avagin@...nvz.org>
To: Michael Kerrisk <mtk.manpages@...il.com>
Cc: linux-man@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Andrey Vagin <avagin@...nvz.org>
Subject: [PATCH] maps.2: fd for a file mapping must be opened for reading
Here is no difference between MAP_SHARED and MAP_PRIVATE.
do_mmap_pgoff()
switch (flags & MAP_TYPE) {
case MAP_SHARED:
...
/* fall through */
case MAP_PRIVATE:
if (!(file->f_mode & FMODE_READ))
return -EACCES;
Signed-off-by: Andrey Vagin <avagin@...nvz.org>
---
man2/mmap.2 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/man2/mmap.2 b/man2/mmap.2
index c0fd321..b469f84 100644
--- a/man2/mmap.2
+++ b/man2/mmap.2
@@ -393,9 +393,7 @@ is set (probably to
.TP
.B EACCES
A file descriptor refers to a non-regular file.
-Or
-.B MAP_PRIVATE
-was requested, but
+Or a file mapping was requested, but
.I fd
is not open for reading.
Or
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists