Date: Wed, 27 Feb 2002 10:30:01 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_prot.c Message-ID: <200202271830.g1RIU1j44792@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202271830.g1RIU1j44792>