entropy: Downgrade consolidation warning from printf to LOG_DEBUG.

Candidate fix for PR kern/55458.  This message is rather technical,
and so is unlikely to be acted on by anyone not debugging the kernel
anyway.  Most likely, on any system where it is a real problem, there
will be another (less technical) entropy warning anyway.
This commit is contained in:
riastradh 2021-01-11 02:18:40 +00:00
parent bf28682f65
commit 0c4aa85688
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_entropy.c,v 1.25 2020/12/11 03:00:09 thorpej Exp $ */
/* $NetBSD: kern_entropy.c,v 1.26 2021/01/11 02:18:40 riastradh 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.25 2020/12/11 03:00:09 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.26 2021/01/11 02:18:40 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -106,6 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.25 2020/12/11 03:00:09 thorpej Ex
#include <sys/sha1.h> /* for boot seed checksum */
#include <sys/stdint.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/xcall.h>
@ -1026,7 +1027,7 @@ entropy_do_consolidate(void)
E->pending -= diff;
if (__predict_false(E->needed > 0)) {
if (ratecheck(&lasttime, &interval))
printf("entropy: WARNING:"
log(LOG_DEBUG, "entropy: WARNING:"
" consolidating less than full entropy\n");
}