public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: shuah@kernel.org
Cc: SeongJae Park <sj38.park@gmail.com>,
	Simon Guo <wei.guo.simon@gmail.com>,
	linux-kselftest@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [PATCH] selftests/vm: Set mmap()'s fd as -1 for MAP_ANONYMOUS flag
Date: Tue, 28 Mar 2017 16:42:27 -0700	[thread overview]
Message-ID: <20170328164227.95f3cc342da28b92be45e25e@linux-foundation.org> (raw)
In-Reply-To: <09a5192e-5a10-c314-4c20-55d57af40015@kernel.org>

On Fri, 24 Mar 2017 10:47:55 -0600 Shuah Khan <shuah@kernel.org> wrote:

> > On Wed, Mar 15, 2017 at 10:19 PM, SeongJae Park <sj38.park@gmail.com> wrote:
> >> Man page of mmap() says that portable applications should ensure fd
> >> argument to be -1 if MAP_ANONYMOUS flag is set as below:
> >> ```
> >> The  mapping is not backed by any file; its contents are initialized to
> >> zero.  The fd and offset arguments are ignored; however, some
> >> implementations require  fd  to be  -1  if  MAP_ANONYMOUS  (or
> >> MAP_ANON)  is specified, and portable applications
> >> should ensure this.
> >> ```
> >>
> >> However, few mmap() calls under selftests/vm/ uses 0 as fd though they
> >> use MAP_ANONYMOUS flag.  This commit changes the argument to be -1 as
> >> recommended.
> 
> Hi Andrew,
> 
> Do you have comments on this patch? Please Ack it if you would
> like me to take it thorugh ksefltest tree.

Acked-by: Andrew Morton <akpm@linux-foundation.org>

  reply	other threads:[~2017-03-28 23:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 13:19 [PATCH] selftests/vm: Set mmap()'s fd as -1 for MAP_ANONYMOUS flag SeongJae Park
2017-03-23  1:09 ` SeongJae Park
2017-03-24 16:47   ` Shuah Khan
2017-03-28 23:42     ` Andrew Morton [this message]
2017-04-13 17:37       ` Shuah Khan

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=20170328164227.95f3cc342da28b92be45e25e@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=shuahkh@osg.samsung.com \
    --cc=sj38.park@gmail.com \
    --cc=wei.guo.simon@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