diff options
author | markm <markm@FreeBSD.org> | 2000-07-09 16:00:31 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-07-09 16:00:31 +0000 |
commit | 40b3a303c279794359361ecd919063c57afce9e5 (patch) | |
tree | f4b60ada8b323a7dfc89998a1cc079b63e31c549 /sys/dev/random/yarrow.c | |
parent | 9474a996bc7d3bb42eb258b6bf69285cb4917217 (diff) | |
download | FreeBSD-src-40b3a303c279794359361ecd919063c57afce9e5.zip FreeBSD-src-40b3a303c279794359361ecd919063c57afce9e5.tar.gz |
Make sure that tasks (running out of taskqueue_swi at splsofttq)
are not interfered with by the harvester.
Diffstat (limited to 'sys/dev/random/yarrow.c')
-rw-r--r-- | sys/dev/random/yarrow.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } } |