diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2005-10-03 01:19:45 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2005-10-03 01:19:45 +0000 |
commit | 0ca2b81d4e18823d3f8e4cf586e53c2d2e72a15d (patch) | |
tree | 9362ce62ad3c99bb19e436ca19924676178aaa16 /sys | |
parent | 34343cad295fd42c2b4842208c6c6a558dc9f4fb (diff) |
In hardclock(), do not setup process virtual and profile timers if the process
is in the midst of exiting. This solves a race condition that causes freed
memory to be left referenced in the master kernel timeout worklist, leading to
a uvm_fault (observed on an i386 MP system). tedu@, deraadt@, miod@ ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index d5bc91a5918..953c9bc58a5 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.52 2004/11/10 11:00:00 grange Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.53 2005/10/03 01:19:44 aaron Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -228,7 +228,7 @@ hardclock(struct clockframe *frame) #endif p = curproc; - if (p) { + if (p && ((p->p_flag & P_WEXIT) == 0)) { register struct pstats *pstats; /* |