<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff -r 291aa77e3052 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c	Tue Oct 29 20:04:30 2024 +0000
+++ b/sys/kern/kern_synch.c	Fri Nov 01 22:23:03 2024 +1100
@@ -506,11 +506,15 @@ void
 updatertime(lwp_t *l, const struct bintime *now)
 {
 	static bool backwards = false;
+	struct bintime now2;
+	int s;
 
 	if (__predict_false(l-&gt;l_flag &amp; LW_IDLE))
 		return;
 
-	if (__predict_false(bintimecmp(now, &amp;l-&gt;l_stime, &lt;)) &amp;&amp; !backwards) {
+	s = splhigh();
+	binuptime(&amp;now2);
+	if (__predict_false(bintimecmp(&amp;now2, &amp;l-&gt;l_stime, &lt;)) &amp;&amp; !backwards) {
 		char caller[128];
 
 #ifdef DDB
@@ -533,13 +537,15 @@ updatertime(lwp_t *l, const struct binti
 		    l-&gt;l_name ? l-&gt;l_name : "",
 		    l-&gt;l_pflag,
 		    (intmax_t)l-&gt;l_stime.sec, l-&gt;l_stime.frac,
-		    (intmax_t)now-&gt;sec, now-&gt;frac,
+		    (intmax_t)now2.sec, now2.frac,
 		    caller);
 	}
 
-	/* rtime += now - stime */
-	bintime_add(&amp;l-&gt;l_rtime, now);
+	/* rtime += now2 - stime */
+	bintime_add(&amp;l-&gt;l_rtime, &amp;now2);
 	bintime_sub(&amp;l-&gt;l_rtime, &amp;l-&gt;l_stime);
+
+	splx(s);
 }
 
 /*
</pre></body></html>