diff options
author | markm <markm@FreeBSD.org> | 2000-07-11 19:37:25 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-07-11 19:37:25 +0000 |
commit | 5812cc4cc4dab735724c12750d5a6cec440726b9 (patch) | |
tree | 46f62a0bbade452e9b00d99478c1c251893260c0 /sys/dev/random/yarrow.c | |
parent | b2ed023a037c625a44f2fc5669c6e85d0df4c160 (diff) | |
download | FreeBSD-src-5812cc4cc4dab735724c12750d5a6cec440726b9.zip FreeBSD-src-5812cc4cc4dab735724c12750d5a6cec440726b9.tar.gz |
Storing to a pointer is (effectively) atomic; no need to protect this
with splhigh(). However, the entropy-harvesting routine needs pretty
serious irq-protection, as it is called out of irq handlers etc.
Clues given by: bde
Diffstat (limited to 'sys/dev/random/yarrow.c')
-rw-r--r-- | sys/dev/random/yarrow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c index 99453f6..c6ae448 100644 --- a/sys/dev/random/yarrow.c +++ b/sys/dev/random/yarrow.c @@ -320,8 +320,8 @@ random_harvest_internal(struct timespec *nanotime, u_int64_t entropy, #endif if (origin < ENTROPYSOURCE) { - /* The reseed task must not be jumped on */ - mask = splsofttq(); + /* Called inside irq handlers; protect from interference */ + mask = splhigh(); which = random_state.which; pool = &random_state.pool[which]; |