Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Log a message when a process blocks due to a lack o...



details:   https://anonhg.NetBSD.org/src/rev/dba3b0e5d2df
branches:  trunk
changeset: 955439:dba3b0e5d2df
user:      gson <gson%NetBSD.org@localhost>
date:      Tue Sep 29 07:51:01 2020 +0000

description:
Log a message when a process blocks due to a lack of entropy.
Discussed on tech-kern.

diffstat:

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

diffs (28 lines):

diff -r aa58d497e97f -r dba3b0e5d2df sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c   Tue Sep 29 03:04:03 2020 +0000
+++ b/sys/kern/kern_entropy.c   Tue Sep 29 07:51:01 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_entropy.c,v 1.23 2020/08/14 00:53:16 riastradh Exp $      */
+/*     $NetBSD: kern_entropy.c,v 1.24 2020/09/29 07:51:01 gson Exp $   */
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.23 2020/08/14 00:53:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.24 2020/09/29 07:51:01 gson Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -1297,6 +1297,9 @@
 
                /* Wait for some entropy to come in and try again.  */
                KASSERT(E->stage >= ENTROPY_WARM);
+               printf("entropy: pid %d (%s) blocking due to lack of entropy\n",
+                      curproc->p_pid, curproc->p_comm);
+
                if (ISSET(flags, ENTROPY_SIG)) {
                        error = cv_wait_sig(&E->cv, &E->lock);
                        if (error)



Home | Main Index | Thread Index | Old Index