Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 2004 13:57:56 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_proc.c
Message-ID:  <411E7CD4.7010504@elischer.org>
In-Reply-To: <200408141715.i7EHFH16049584@repoman.freebsd.org>
References:  <200408141715.i7EHFH16049584@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote:
> rwatson     2004-08-14 17:15:16 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/kern             kern_proc.c 
>   Log:
>   Cause pfind() not to return processes in the PRS_NEW state.  As a result,
>   threads consuming the result of pfind() will not need to check for a NULL
>   credential pointer or other signs of an incompletely created process.
>   However, this also means that pfind() cannot be used to test for the
>   existence or find such a process.  Annotate pfind() to indicate that this
>   is the case.  A review of curent consumers seems to indicate that this is
>   not a problem for any of them.  This closes a number of race conditions
>   that could result in NULL pointer dereferences and related failure modes.
>   Other related races continue to exist, especially during iteration of the
>   allproc list without due caution.

possibly part of the answer would be to not put the proc on any queues until it 
is more set up..

>   
>   Discussed with: tjr, green
>   
>   Revision  Changes    Path
>   1.215     +8 -1      src/sys/kern/kern_proc.c




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