From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Andrey Vagin <avagin@openvz.org>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] maps.2: fd for a file mapping must be opened for reading
Date: Fri, 04 Apr 2014 13:27:33 +0200 [thread overview]
Message-ID: <533E9725.90708@gmail.com> (raw)
In-Reply-To: <1396599875-10562-1-git-send-email-avagin@openvz.org>
On 04/04/2014 10:24 AM, Andrey Vagin wrote:
> Here is no difference between MAP_SHARED and MAP_PRIVATE.
Thanks, Andrey. That man page text has been there for a very long time,
but but does not seem to correspond to the truth in any kernel version
going back even to Linux 1.0. Patch applied.
Cheers,
Michael
> 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@openvz.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
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
prev parent reply other threads:[~2014-04-04 11:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 8:24 [PATCH] maps.2: fd for a file mapping must be opened for reading Andrey Vagin
2014-04-04 11:27 ` Michael Kerrisk (man-pages) [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=533E9725.90708@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=avagin@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).