From 40b3a303c279794359361ecd919063c57afce9e5 Mon Sep 17 00:00:00 2001 From: markm Date: Sun, 9 Jul 2000 16:00:31 +0000 Subject: Make sure that tasks (running out of taskqueue_swi at splsofttq) are not interfered with by the harvester. --- sys/dev/random/yarrow.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/dev/random/yarrow.c') diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c index dab10b5..c024160 100644 --- a/sys/dev/random/yarrow.c +++ b/sys/dev/random/yarrow.c @@ -297,12 +297,16 @@ random_harvest_internal(struct timespec *nanotime, u_int64_t entropy, struct entropy *bucket; struct source *source; struct pool *pool; + intrmask_t mask; #ifdef DEBUG printf("Random harvest\n"); #endif if (origin < ENTROPYSOURCE) { + /* The reseed task must not be jumped on */ + mask = splsofttq(); + which = random_state.which; pool = &random_state.pool[which]; source = &pool->source[origin]; @@ -340,5 +344,6 @@ random_harvest_internal(struct timespec *nanotime, u_int64_t entropy, random_state.which = !random_state.which; } + splx(mask); } } -- cgit v1.1