CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2024/08/05 17:51:11

Modified files:
        sys/kern       : kern_timeout.c 
        sys/sys        : timeout.h 

Log message:
change the nsec argument to timeout_add_nsec from int to uint64_t

you can only fit a couple of nanonseconds into an int, which limited
the usefulness of the api. worse, if a large nsec value was passed
in it could be cast to a negative int value which tripped over a
KASSERT at the top of timeout_add that ends up being called. avoid
this footgun by working in the bigger type and doing the same range
checks/fixes for other timeout_add wrappers.

ok claudio@ mvs@

Reply via email to