Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix kern/46911: note that we rekeyed the cprng so w...



details:   https://anonhg.NetBSD.org/src/rev/6155df37fb44
branches:  trunk
changeset: 781450:6155df37fb44
user:      tls <tls%NetBSD.org@localhost>
date:      Fri Sep 07 02:42:13 2012 +0000

description:
Fix kern/46911: note that we rekeyed the cprng so we don't keep doing so.

diffstat:

 sys/kern/subr_cprng.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 739ca61da16c -r 6155df37fb44 sys/kern/subr_cprng.c
--- a/sys/kern/subr_cprng.c     Fri Sep 07 02:11:32 2012 +0000
+++ b/sys/kern/subr_cprng.c     Fri Sep 07 02:42:13 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_cprng.c,v 1.10 2012/09/05 18:57:34 tls Exp $ */
+/*     $NetBSD: subr_cprng.c,v 1.11 2012/09/07 02:42:13 tls Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
 
 #include <sys/cprng.h>
 
-__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.10 2012/09/05 18:57:34 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.11 2012/09/07 02:42:13 tls Exp $");
 
 void
 cprng_init(void)
@@ -230,6 +230,7 @@
 
        /* If we were initialized with the pool empty, rekey ASAP */
        if (__predict_false(c->entropy_serial == -1) && rnd_initial_entropy) {
+               c->entropy_serial = 0;
                goto rekeyany;          /* We have _some_ entropy, use it. */
        }
                



Home | Main Index | Thread Index | Old Index