From owner-cvs-src@FreeBSD.ORG Sat Aug 14 20:57:59 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6447216A4CE; Sat, 14 Aug 2004 20:57:59 +0000 (GMT) Received: from pimout1-ext.prodigy.net (pimout1-ext.prodigy.net [207.115.63.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C9CE43D46; Sat, 14 Aug 2004 20:57:59 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-68-124-233-133.dsl.snfc21.pacbell.net [68.124.233.133])i7EKvu5C080514; Sat, 14 Aug 2004 16:57:57 -0400 Message-ID: <411E7CD4.7010504@elischer.org> Date: Sat, 14 Aug 2004 13:57:56 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Robert Watson References: <200408141715.i7EHFH16049584@repoman.freebsd.org> In-Reply-To: <200408141715.i7EHFH16049584@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_proc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2004 20:57:59 -0000 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