aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/random/random_harvestq.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-05-23 21:02:27 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-05-23 21:02:27 +0000
commit00e0e488a023967ad9a650f64cb4d77ec83a812d (patch)
tree0205ddae6ade31d6d35c1278842e5b027a477fef /sys/dev/random/random_harvestq.c
parentdc8f7777870741d6dbdc1c2d66c1f8346bc8b58a (diff)
Notes
Diffstat (limited to 'sys/dev/random/random_harvestq.c')
-rw-r--r--sys/dev/random/random_harvestq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c
index b88d98bb845f..eb8d300cc3d2 100644
--- a/sys/dev/random/random_harvestq.c
+++ b/sys/dev/random/random_harvestq.c
@@ -163,6 +163,7 @@ random_harvestq_fast_process_event(struct harvest_event *event)
#if defined(RANDOM_LOADABLE)
RANDOM_CONFIG_S_UNLOCK();
#endif
+ explicit_bzero(event, sizeof(*event));
}
static void
@@ -437,7 +438,6 @@ random_harvestq_prime(void *unused __unused)
harvest_context.hc_destination[RANDOM_CACHED]++;
memcpy(event.he_entropy, data + i, sizeof(event.he_entropy));
random_harvestq_fast_process_event(&event);
- explicit_bzero(&event, sizeof(event));
}
explicit_bzero(data, size);
if (bootverbose)
@@ -540,7 +540,6 @@ random_harvest_direct_(const void *entropy, u_int size, enum random_entropy_sour
event.he_destination = harvest_context.hc_destination[origin]++;
memcpy(event.he_entropy, entropy, size);
random_harvestq_fast_process_event(&event);
- explicit_bzero(&event, sizeof(event));
}
void