Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Missed a spot! (Part II(b) of no percpu_foreach un...
details: https://anonhg.NetBSD.org/src/rev/bca2365f7b67
branches: trunk
changeset: 1009692:bca2365f7b67
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Apr 30 17:16:00 2020 +0000
description:
Missed a spot! (Part II(b) of no percpu_foreach under spin lock.)
diffstat:
sys/kern/kern_entropy.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r cec13c0063af -r bca2365f7b67 sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c Thu Apr 30 16:56:23 2020 +0000
+++ b/sys/kern/kern_entropy.c Thu Apr 30 17:16:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_entropy.c,v 1.4 2020/04/30 16:50:00 riastradh Exp $ */
+/* $NetBSD: kern_entropy.c,v 1.5 2020/04/30 17:16:00 riastradh Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.4 2020/04/30 16:50:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.5 2020/04/30 17:16:00 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -2000,7 +2000,9 @@
break;
}
while (i < stat->count && rs != NULL) {
+ mutex_exit(&E->lock);
rndsource_to_user(rs, &stat->source[i++]);
+ mutex_enter(&E->lock);
rs = LIST_NEXT(rs, list);
}
KASSERT(i <= stat->count);
Home |
Main Index |
Thread Index |
Old Index