Module Name: src Committed By: pooka Date: Thu Dec 13 15:35:09 UTC 2012
Modified Files: src/lib/librumpuser: rumpuser.c Log Message: Apparently MAP_ANON mmap() on Linux requires MAP_PRIVATE to be specified for the addr parameter to have a sane effect. Make it so. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/librumpuser/rumpuser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.23 src/lib/librumpuser/rumpuser.c:1.24 --- src/lib/librumpuser/rumpuser.c:1.23 Sun Nov 18 19:29:40 2012 +++ src/lib/librumpuser/rumpuser.c Thu Dec 13 15:35:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.23 2012/11/18 19:29:40 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.24 2012/12/13 15:35:09 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include "rumpuser_port.h" #if !defined(lint) -__RCSID("$NetBSD: rumpuser.c,v 1.23 2012/11/18 19:29:40 pooka Exp $"); +__RCSID("$NetBSD: rumpuser.c,v 1.24 2012/12/13 15:35:09 pooka Exp $"); #endif /* !lint */ #include <sys/ioctl.h> @@ -261,7 +261,7 @@ rumpuser_anonmmap(void *prefaddr, size_t if (exec) prot |= PROT_EXEC; rv = mmap(prefaddr, size, prot, - MAP_ANON | MAP_ALIGNED(alignbit), -1, 0); + MAP_PRIVATE | MAP_ANON | MAP_ALIGNED(alignbit), -1, 0); if (rv == MAP_FAILED) { seterror(errno); return NULL;