Page MenuHomeFreeBSD
Paste P537

Command-Line Input
ActivePublic

Authored by jhb on Feb 2 2022, 11:20 PM.
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index d0fb19661fa4..bb981f423c7c 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -430,6 +430,7 @@ callout_get_bucket(sbintime_t sbt)
void
callout_process(sbintime_t now)
{
+ struct intr_entropy entropy;
struct callout *tmp, *tmpn;
struct callout_cpu *cc;
struct callout_list *sc;
@@ -545,6 +546,10 @@ callout_process(sbintime_t now)
avg_lockcalls_dir += (lockcalls_dir * 1000 - avg_lockcalls_dir) >> 8;
#endif
if (!TAILQ_EMPTY(&cc->cc_expireq)) {
+ entropy.event = (uintptr_t)cc;
+ entropy.td = curthread;
+ random_harvest_queue(&entropy, sizeof(entropy), RANDOM_SWI);
+
td = cc->cc_thread;
if (TD_AWAITING_INTR(td)) {
thread_lock_block_wait(td);

Event Timeline