From owner-cvs-all Wed Feb 27 10:30: 8 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8B43437B405; Wed, 27 Feb 2002 10:30:01 -0800 (PST) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1RIU1j44792; Wed, 27 Feb 2002 10:30:01 -0800 (PST) (envelope-from jhb) Message-Id: <200202271830.g1RIU1j44792@freefall.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2002 10:30:01 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_prot.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2002/02/27 10:30:01 PST Modified files: sys/kern kern_prot.c Log: Temporarily lock Giant while we update td_ucred. The proc lock doesn't fully protect p_ucred yet so Giant is needed until all the p_ucred locking is done. This is the original reason td_ucred was not used immediately after its addition. Unfortunately, not using td_ucred is not enough to avoid problems. Since p_ucred could be stale, we could actually be dereferencing a stale pointer to dink with the refcount, so we really need Giant to avoid foot-shooting. This allows td_ucred to be safely used as well. Revision Changes Path 1.139 +6 -6 src/sys/kern/kern_prot.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message