Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Missing MAP_PRIVATE on mmap
details: https://anonhg.NetBSD.org/src/rev/a606d5a8d7de
branches: trunk
changeset: 808332:a606d5a8d7de
user: justin <justin%NetBSD.org@localhost>
date: Wed May 13 23:15:57 2015 +0000
description:
Missing MAP_PRIVATE on mmap
diffstat:
lib/libc/gen/arc4random.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r f77a5ac0b206 -r a606d5a8d7de lib/libc/gen/arc4random.c
--- a/lib/libc/gen/arc4random.c Wed May 13 22:41:48 2015 +0000
+++ b/lib/libc/gen/arc4random.c Wed May 13 23:15:57 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arc4random.c,v 1.29 2015/03/19 05:46:25 riastradh Exp $ */
+/* $NetBSD: arc4random.c,v 1.30 2015/05/13 23:15:57 justin Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: arc4random.c,v 1.29 2015/03/19 05:46:25 riastradh Exp $");
+__RCSID("$NetBSD: arc4random.c,v 1.30 2015/05/13 23:15:57 justin Exp $");
#include "namespace.h"
#include "reentrant.h"
@@ -444,7 +444,7 @@
struct arc4random_prng *prng;
const size_t size = roundup(sizeof(*prng), sysconf(_SC_PAGESIZE));
- prng = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
+ prng = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
if (prng == MAP_FAILED)
goto fail0;
if (minherit(prng, size, MAP_INHERIT_ZERO) == -1)
Home |
Main Index |
Thread Index |
Old Index