Date: Tue, 19 Feb 2002 00:10:01 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Julian Elischer <julian@elischer.org> Cc: Matthew Dillon <dillon@apollo.backplane.com>, Peter Wemm <peter@wemm.org>, current@FreeBSD.ORG Subject: Re: Patch sets to date and timing tests with Giant out of userret. Message-ID: <3C720859.C77590F0@mindspring.com> References: <Pine.BSF.4.21.0202182322050.53728-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer wrote: > The fully safe version of this code is: > td->td_retval[0] = td->td_ucred->cr_ruid; > td->td_retval[1] = td->td_ucred->cr_uid; > return (0); > > because td->td_ucred is read-only for it's whole existance. ??? Are you sure that td->td_ucred can't change in the middle, to point to a different ucred, as a result of kernel preemption? -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C720859.C77590F0>