Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 2003 10:10:13 -0700 (PDT)
From:      Tor.Egge@cvsup.no.freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/51964: panic: race condition with realitexpire() called for	zombie
Message-ID:  <200305101710.h4AHADBj040713@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/51964; it has been noted by GNATS.

From: Tor.Egge@cvsup.no.freebsd.org
To: jilles@stack.nl
Cc: FreeBSD-gnats-submit@freebsd.org, svdb@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305101710.h4AHADBj040713>