Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2018 14:53:43 +0000 (UTC)
From:      Mark Murray <markm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338292 - head/sys/dev/random
Message-ID:  <201808241453.w7OErhXf010222@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org>
  Reported by:    Danilo Egea Gondolfo <danilo@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808241453.w7OErhXf010222>