Module Name:    src
Committed By:   tls
Date:           Fri Sep  7 02:42:13 UTC 2012

Modified Files:
        src/sys/kern: subr_cprng.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/subr_cprng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.10 src/sys/kern/subr_cprng.c:1.11
--- src/sys/kern/subr_cprng.c:1.10	Wed Sep  5 18:57:34 2012
+++ src/sys/kern/subr_cprng.c	Fri Sep  7 02:42:13 2012
@@ -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 @@ cprng_strong(cprng_strong_t *const c, vo
 
 	/* 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. */
 	}
 		

Reply via email to