summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/random/yarrow.c5
-rw-r--r--sys/dev/randomdev/yarrow.c5
2 files changed, 10 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);
}
}
diff --git a/sys/dev/randomdev/yarrow.c b/sys/dev/randomdev/yarrow.c
index dab10b5..c024160 100644
--- a/sys/dev/randomdev/yarrow.c
+++ b/sys/dev/randomdev/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);
}
}
OpenPOWER on IntegriCloud