From owner-cvs-all@FreeBSD.ORG Sat Aug 14 21:01:47 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E2CC16A4CF; Sat, 14 Aug 2004 21:01:47 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 261CA43D41; Sat, 14 Aug 2004 21:01:47 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i7EL00H2031165; Sat, 14 Aug 2004 17:00:00 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i7EL00nc031162; Sat, 14 Aug 2004 17:00:00 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sat, 14 Aug 2004 16:59:59 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <411E7CD4.7010504@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2004 21:01:47 -0000 On Sat, 14 Aug 2004, Julian Elischer wrote: > > 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.. Tim had a set of modifications to keep them on a separate list, but I think he also decided it was quite a bit more complicated than they had hoped. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research