All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Vasileios Karakasis <bkk@cslab.ece.ntua.gr>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-numa@vger.kernel.org
Subject: Re: [BUG] Invalid return address of mmap() followed by mbind() in multithreaded context
Date: Sat, 18 Jun 2011 20:12:32 +0200	[thread overview]
Message-ID: <20110618181232.GI16236@one.firstfloor.org> (raw)
In-Reply-To: <4DFB710D.7000902@cslab.ece.ntua.gr>

>     for (i = 0; i < NR_ITER; i++) {
>         addr = mmap(0, PAGE_SIZE, PROT_READ | PROT_WRITE,
>                     MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
>         if (addr == (void *) -1) {
>             assert(0 && "mmap failed");
>         }
>         *addr = 0;
> 
>         err = mbind(addr, PAGE_SIZE, MPOL_BIND, &node, sizeof(node), 0);

mbind() can be only done before the first touch. you're not actually testing 
numa policy.

-andi

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <andi@firstfloor.org>
To: Vasileios Karakasis <bkk@cslab.ece.ntua.gr>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-numa@vger.kernel.org
Subject: Re: [BUG] Invalid return address of mmap() followed by mbind() in multithreaded context
Date: Sat, 18 Jun 2011 20:12:32 +0200	[thread overview]
Message-ID: <20110618181232.GI16236@one.firstfloor.org> (raw)
In-Reply-To: <4DFB710D.7000902@cslab.ece.ntua.gr>

>     for (i = 0; i < NR_ITER; i++) {
>         addr = mmap(0, PAGE_SIZE, PROT_READ | PROT_WRITE,
>                     MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
>         if (addr == (void *) -1) {
>             assert(0 && "mmap failed");
>         }
>         *addr = 0;
> 
>         err = mbind(addr, PAGE_SIZE, MPOL_BIND, &node, sizeof(node), 0);

mbind() can be only done before the first touch. you're not actually testing 
numa policy.

-andi

  reply	other threads:[~2011-06-18 18:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 15:21 [BUG] Invalid return address of mmap() followed by mbind() in multithreaded context Vasileios Karakasis
2011-06-18 18:12 ` Andi Kleen [this message]
2011-06-18 18:12   ` Andi Kleen
2011-06-18 18:41   ` Vasileios Karakasis
2011-06-19 23:42     ` Vasileios Karakasis
2011-06-27 17:18 ` Kornilios Kourtis
2011-06-27 17:18   ` Kornilios Kourtis
2011-06-28  2:06   ` KOSAKI Motohiro
2011-06-28  2:06     ` KOSAKI Motohiro

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=20110618181232.GI16236@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=bkk@cslab.ece.ntua.gr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-numa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.