Re: [BUG] Invalid return address of mmap() followed by mbind() in multithreaded context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>     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 from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux