Make sure that tasks (running out of taskqueue_swi at splsofttq)
are not interfered with by the harvester.
This commit is contained in:
parent
d0a28baf34
commit
43975bd56c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62850
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user