kern/51964: panic: race condition with realitexpire() called for zombie

Tor.Egge at cvsup.no.freebsd.org Tor.Egge at cvsup.no.freebsd.org
Sat May 10 10:10:14 PDT 2003


The following reply was made to PR kern/51964; it has been noted by GNATS.

From: Tor.Egge at cvsup.no.freebsd.org
To: jilles at stack.nl
Cc: FreeBSD-gnats-submit at freebsd.org, svdb at stack.nl
Subject: Re: kern/51964: panic: race condition with realitexpire() called
 for	zombie
Date: Sat, 10 May 2003 17:07:56 GMT

 The enclosed patch should fix the problem if your source is newer than
 "2003/05/01 14:16:38 PDT" (the struct proc mutex must be persistent).
 
 If callout_pending() is true then callout_reset() has been called.
 If callout_active() is false then callout_stop() has been called.
 
 ---------------------------
 Index: sys/kern/kern_time.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/kern/kern_time.c,v
 retrieving revision 1.101
 diff -u -r1.101 kern_time.c
 --- sys/kern/kern_time.c	26 Feb 2003 17:16:38 -0000	1.101
 +++ sys/kern/kern_time.c	10 May 2003 16:44:41 -0000
 @@ -527,6 +527,12 @@
  
  	p = (struct proc *)arg;
  	PROC_LOCK(p);
 +	/* Check for callout being active */
 +	if (callout_pending(&p->p_itcallout) ||
 +	    !callout_active(&p->p_itcallout)) {
 +		PROC_UNLOCK(p);
 +		return;
 +	}
  	psignal(p, SIGALRM);
  	if (!timevalisset(&p->p_realtimer.it_interval)) {
  		timevalclear(&p->p_realtimer.it_value);
 ---------------------------
 
 - Tor Egge


More information about the freebsd-bugs mailing list