From 0ca2b81d4e18823d3f8e4cf586e53c2d2e72a15d Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Mon, 3 Oct 2005 01:19:45 +0000 Subject: 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 --- sys/kern/kern_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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; /* -- cgit v1.2.3