diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-10-24 01:09:24 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-10-24 01:09:24 +0000 |
commit | 238f3ee5f4f09380d958cce0cb993bb0cc6d500a (patch) | |
tree | 9bef7ea6ed5001457ae4aa2021b42b9b7a731f58 /sys/kern | |
parent | e66e7ee6bbe3a5b6d25e28eba2984a209a1d69da (diff) | |
download | FreeBSD-src-238f3ee5f4f09380d958cce0cb993bb0cc6d500a.zip FreeBSD-src-238f3ee5f4f09380d958cce0cb993bb0cc6d500a.tar.gz |
Don't rearm callout if the process is exiting, it may leak a callout
because callout_drain() only waits for running callout, but not disable
it if it is rearmed.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 6e73477..c0b9ebd 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -638,7 +638,8 @@ lim_cb(void *arg) psignal(p, SIGXCPU); } } - callout_reset(&p->p_limco, hz, lim_cb, p); + if ((p->p_flag & P_WEXIT) == 0) + callout_reset(&p->p_limco, hz, lim_cb, p); } int |