⬢ DragonFlyBSD Kernel Audit
DF-5834 / fix.diff
← back to finding ↓ download raw
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1616,6 +1616,8 @@
 	to = INT_MAX;
 	if (timeout->tv_sec > -1)
 		to = tstohz_low(timeout);
+	if (to == 0)
+		to = 1;		/* a finite (sub-tick) timeout must still time out */
 
 	ap = &pps->ppsinfo.assert_sequence;
 	cp = &pps->ppsinfo.clear_sequence;