lkml.org 
[lkml]   [2006]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [discuss] mmap, mbind and write to mmap'ed memory crashes 2.6.16-rc1[2] on 2 node X86_64
On Sun, 5 Feb 2006, Andi Kleen wrote:

> > The kernel crashes when I run an application which does:
> > - mmap (0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS)
> > - mbind the memory to the 1st node with policy MPOL_BIND
> > - write to that memory

Tried the following code on rc1 and rc2 and it worked fine on ia64:

#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <numaif.h>

int main(int argc, void *argv[])
{
char *p;
unsigned long nodes = 0x01;

p = mmap(0, 32768, PROT_READ| PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, 0, 0);
mbind(p, 32768, MPOL_BIND, &nodes, 64, 0);
p[34] = 89;
return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-06 17:14    [W:0.044 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site