Re: 2.6.17-rc1-mm1: mlockall() regression on x86_64

From: Rafael J. Wysocki
Date: Tue Apr 04 2006 - 17:07:01 EST


On Tuesday 04 April 2006 10:45, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc1/2.6.17-rc1-mm1/

With this kernel mlockall(MCL_CURRENT | MCL_FUTURE) returns -EFAULT if called
by root (unconditionally, it seems) on x86_64.

On my box the output of:

#include <sys/mman.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

int main()
{
int ret;

ret = mlockall(MCL_CURRENT | MCL_FUTURE);
if (ret < 0)
printf("%s\n", strerror(errno));

return 0;
}

is "Bad address", if run by root.

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