Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Schedule wakeups asynchronously in rnd_extract_data.
details: https://anonhg.NetBSD.org/src/rev/f138d4fc9056
branches: trunk
changeset: 789619:f138d4fc9056
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Aug 27 14:01:35 2013 +0000
description:
Schedule wakeups asynchronously in rnd_extract_data.
Otherwise, rndsink_request takes rndsinks_lock and calls
rnd_extract_data, which synchronously calls rndsinks_distribute,
which takes rndsinks_lock -> boom.
This is a stop-gap on a stop-gap on a stop-gap; we really ought to
back out all of these stop-gaps, make bcm2835_rng call rnd_add_data
asynchronously to work around the original symptom, and design a real
solution when we have time to sort this mess out properly.
diffstat:
sys/kern/kern_rndq.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d80efe8ee684 -r f138d4fc9056 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c Tue Aug 27 13:12:29 2013 +0000
+++ b/sys/kern/kern_rndq.c Tue Aug 27 14:01:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rndq.c,v 1.16 2013/08/26 23:41:24 tls Exp $ */
+/* $NetBSD: kern_rndq.c,v 1.17 2013/08/27 14:01:35 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.16 2013/08/26 23:41:24 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.17 2013/08/27 14:01:35 riastradh Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -1038,7 +1038,7 @@
mutex_spin_exit(&rndpool_mtx);
if (wake) {
- rnd_wakeup_readers();
+ rnd_schedule_wakeup();
}
return retval;
Home |
Main Index |
Thread Index |
Old Index