From owner-cvs-src@FreeBSD.ORG Tue Feb 28 20:11:32 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org 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 AA21B16A420; Tue, 28 Feb 2006 20:11:32 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A01B43D5E; Tue, 28 Feb 2006 20:11:31 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1SKBUtq052042; Tue, 28 Feb 2006 20:11:30 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1SKBU5G052041; Tue, 28 Feb 2006 20:11:30 GMT (envelope-from jhb) Message-Id: <200602282011.k1SKBU5G052041@repoman.freebsd.org> From: John Baldwin Date: Tue, 28 Feb 2006 20:11:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys proc.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 28 Feb 2006 20:11:32 -0000 jhb 2006-02-28 20:11:30 UTC FreeBSD src repository Modified files: sys/sys proc.h Log: Allow PHOLD()'s of curproc even if P_WEXIT is set. Normally we don't want to allow PHOLD()'s of processes that have P_WEXIT set as once that flag is set we aren't guaranteed to block in exit1() waiting for the PRELE() (we might already be past the wait). However, curproc is a bit of a special case. By the time P_WEXIT is set, the process is single-threaded, so the only thread for which can do a PHOLD(curproc) is the thread executing in exit1(). The fact that this thread is executing ensures that the process won't go away before the current hold is released via PRELE(). This fixes some panics due to kicking off softupdate operations inside of exit1() after the recent PHOLD changes to fix ptrace/procfs vs exit races. MFC after: 1 week Tested by: pho Revision Changes Path 1.455 +2 -1 src/sys/sys/proc.h