From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [BUG] Invalid return address of mmap() followed by mbind() in multithreaded context Date: Sat, 18 Jun 2011 20:12:32 +0200 Message-ID: <20110618181232.GI16236@one.firstfloor.org> References: <4DFB710D.7000902@cslab.ece.ntua.gr> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <4DFB710D.7000902@cslab.ece.ntua.gr> Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vasileios Karakasis Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-numa@vger.kernel.org > 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: email@kvack.org