diff options
author | 2005-10-03 01:19:44 +0000 | |
---|---|---|
committer | 2005-10-03 01:19:44 +0000 | |
commit | a85510761c9244257cc63b2cc593b2986baeb95c (patch) | |
tree | 33e803776b5619595d5fadb59b3949b44506c453 /sys/kern/kern_clock.c | |
parent | pci machines need the hme stub here (diff) | |
download | wireguard-openbsd-a85510761c9244257cc63b2cc593b2986baeb95c.tar.xz wireguard-openbsd-a85510761c9244257cc63b2cc593b2986baeb95c.zip |
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/kern/kern_clock.c')
-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; /* |