Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern entropy(9): Reduce global entropy lock from IPL_VM ...
details: https://anonhg.NetBSD.org/src/rev/b5046c26e7b6
branches: trunk
changeset: 363956:b5046c26e7b6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Mar 18 23:35:19 2022 +0000
description:
entropy(9): Reduce global entropy lock from IPL_VM to IPL_SOFTSERIAL.
This is no longer ever taken in hard interrupt context, so there's no
longer any need to block interrupts while doing crypto operations on
the global entropy pool.
diffstat:
sys/kern/kern_entropy.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 46fdf1460c49 -r b5046c26e7b6 sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c Fri Mar 18 23:35:07 2022 +0000
+++ b/sys/kern/kern_entropy.c Fri Mar 18 23:35:19 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_entropy.c,v 1.38 2022/03/18 23:35:07 riastradh Exp $ */
+/* $NetBSD: kern_entropy.c,v 1.39 2022/03/18 23:35:19 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.38 2022/03/18 23:35:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.39 2022/03/18 23:35:19 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -366,7 +366,7 @@
NULL, 0, &E->epoch, 0, CTL_CREATE, CTL_EOL);
/* Initialize the global state for multithreaded operation. */
- mutex_init(&E->lock, MUTEX_DEFAULT, IPL_VM);
+ mutex_init(&E->lock, MUTEX_DEFAULT, IPL_SOFTSERIAL);
cv_init(&E->cv, "entropy");
selinit(&E->selq);
cv_init(&E->sourcelock_cv, "entsrclock");
Home |
Main Index |
Thread Index |
Old Index