diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1822,8 +1822,11 @@ } if (its->its_timers[0] == NULL && its->its_timers[1] == NULL && its->its_timers[2] == NULL) { - free(its, M_SUBPROC); + /* Synchronize with itimer_proc_continue(). */ + PROC_LOCK(p); p->p_itimers = NULL; + PROC_UNLOCK(p); + free(its, M_SUBPROC); } }