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 <c...@freebsd.org>
  Reported by:    Danilo Egea Gondolfo <dan...@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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to