git: kern: Update cputimer_select() to warn about timer jumping backward

Aaron LI aly at crater.dragonflybsd.org
Mon Aug 25 23:21:25 PDT 2025


commit 1d24c68fb669abba66dc9cc2d8bb4a349a362551
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Aug 26 10:14:19 2025 +0800

    kern: Update cputimer_select() to warn about timer jumping backward
    
    The timer->count() must be monotonically increasing; otherwise, there
    must be some unexpected underflow/overflow in the timer, and strange
    things may happen, e.g., the wrong uptime bug (Bug #3299).
    
    To help catch such bugs, add a kprintf() to warn about it.
    
    Discussed-with: dillon

Summary of changes:
 sys/kern/kern_cputimer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1d24c68fb669abba66dc9cc2d8bb4a349a362551


-- 
DragonFly BSD source repository


More information about the Commits mailing list