svn commit: r338292 - head/sys/dev/random

Mark Murray markm at FreeBSD.org
Fri Aug 24 14:53:43 UTC 2018


Author: markm
Date: Fri Aug 24 14:53:42 2018
New Revision: 338292
URL: https://svnweb.freebsd.org/changeset/base/338292

Log:
  Fix braino of mine where the reseeds would happen far too often,
  making the kernel process way too busy.
  
  PR:             230808
  Submitted by:   Conrad Meyer <cem at FreeBSD.org>
  Reported by:    Danilo Egea Gondolfo <danilo at FreeBSD.org>
  Reviewed by:	cem,delphij
  Approved by:	re(rgrimes)
  Approved by:	so(delphij)
  MFC after:      1 Month
  Security:	Yes
  Differential Revision:	https://reviews.freebsd.org/D16872

Modified:
  head/sys/dev/random/fortuna.c

Modified: head/sys/dev/random/fortuna.c
==============================================================================
--- head/sys/dev/random/fortuna.c	Fri Aug 24 10:50:19 2018	(r338291)
+++ head/sys/dev/random/fortuna.c	Fri Aug 24 14:53:42 2018	(r338292)
@@ -371,7 +371,7 @@ random_fortuna_pre_read(void)
 	if (fortuna_state.fs_pool[0].fsp_length >= fortuna_state.fs_minpoolsize
 #ifdef _KERNEL
 	    /* FS&K - Use 'getsbinuptime()' to prevent reseed-spamming. */
-	    && (now - fortuna_state.fs_lasttime > hz/10)
+	    && (now - fortuna_state.fs_lasttime > SBT_1S/10)
 #endif
 	) {
 #ifdef _KERNEL


More information about the svn-src-head mailing list