diff options
author | tjr <tjr@FreeBSD.org> | 2003-02-17 10:03:02 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-02-17 10:03:02 +0000 |
commit | 6ebeaa8ec8a84c0fe2ebf0392ae3386ba9840a81 (patch) | |
tree | 70379db9c789bdee37bcb55df1faf55a4e2e6708 /sys/kern/kern_exit.c | |
parent | 5c29a640b86af6a1bd38d6186b82cba5e9c21065 (diff) | |
download | FreeBSD-src-6ebeaa8ec8a84c0fe2ebf0392ae3386ba9840a81.zip FreeBSD-src-6ebeaa8ec8a84c0fe2ebf0392ae3386ba9840a81.tar.gz |
Use the proc lock to protect p_realtimer instead of Giant, and obtain
sched_lock around accesses to p_stats->p_timer[] to avoid a potential
race with hardclock. getitimer(), setitimer() and the realitexpire()
callout are now Giant-free.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 545fa3a..abf9025 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -237,9 +237,9 @@ exit1(td, rv) stopprofclock(p); p->p_flag &= ~(P_TRACED | P_PPWAIT); SIGEMPTYSET(p->p_siglist); - PROC_UNLOCK(p); if (timevalisset(&p->p_realtimer.it_value)) callout_stop(&p->p_itcallout); + PROC_UNLOCK(p); /* * Reset any sigio structures pointing to us as a result of |