Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Do not call cprng_fast32() before ...



details:   https://anonhg.NetBSD.org/src/rev/ca9eea04b5f3
branches:  trunk
changeset: 771630:ca9eea04b5f3
user:      njoly <njoly%NetBSD.org@localhost>
date:      Sat Nov 26 21:41:02 2011 +0000

description:
Do not call cprng_fast32() before locks init. Makes rump build with
RUMP_LOCKDEBUG=yes work again.

diffstat:

 sys/rump/librump/rumpkern/rump.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (48 lines):

diff -r a5686ade670e -r ca9eea04b5f3 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Sat Nov 26 18:36:48 2011 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Sat Nov 26 21:41:02 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.235 2011/11/19 22:51:30 tls Exp $   */
+/*     $NetBSD: rump.c,v 1.236 2011/11/26 21:41:02 njoly Exp $ */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.235 2011/11/19 22:51:30 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.236 2011/11/26 21:41:02 njoly Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -283,14 +283,6 @@
        initmsgbuf(rump_msgbuf, sizeof(rump_msgbuf));
        aprint_verbose("%s%s", copyright, version);
 
-       /*
-        * Seed arc4random() with a "reasonable" amount of randomness.
-        * Yes, this is a quick kludge which depends on the arc4random
-        * implementation.
-        */
-       messthestack();
-       cprng_fast32();
-
        if (rump_version != RUMP_VERSION) {
                printf("rump version mismatch, %d vs. %d\n",
                    rump_version, RUMP_VERSION);
@@ -335,6 +327,14 @@
 
        kauth_init();
 
+       /*
+        * Seed arc4random() with a "reasonable" amount of randomness.
+        * Yes, this is a quick kludge which depends on the arc4random
+        * implementation.
+        */
+       messthestack();
+       cprng_fast32();
+
        procinit();
        proc0_init();
        uid_init();



Home | Main Index | Thread Index | Old Index