CVSROOT:        /cvs
Module name:    src
Changes by:     chel...@cvs.openbsd.org 2020/10/14 22:28:43

Modified files:
        sys/kern       : kern_exit.c kern_exec.c kern_time.c 
        sys/sys        : time.h 

Log message:
_exit(2), execve(2): cancel per-process interval timers safely

During _exit(2) and sometimes during execve(2) we need to cancel any
active per-process interval timers.  We don't currently do this in an
MP-safe way.  Both syscalls ignore the locking assumptions documented
in proc.h.

The easiest way to make them MP-safe is to use setitimer(), just like
the getitimer(2) and setitimer(2) syscalls do.  To make things a bit
cleaner I have added a helper function, cancelitimer(), so the callers
don't need to fuss with an itimerval struct.

While we're here we can remove the splclock/splx dance from execve(2).
It is no longer necessary.

ok deraadt@

Reply via email to