From owner-freebsd-current Tue Feb 19 1:20:13 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 5178637B400 for ; Tue, 19 Feb 2002 01:20:09 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020219092008.ZIIO2951.rwcrmhc53.attbi.com@InterJet.elischer.org>; Tue, 19 Feb 2002 09:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id BAA56035; Tue, 19 Feb 2002 01:13:57 -0800 (PST) Date: Tue, 19 Feb 2002 01:13:55 -0800 (PST) From: Julian Elischer To: Terry Lambert Cc: Matthew Dillon , Peter Wemm , current@FreeBSD.ORG Subject: Re: Patch sets to date and timing tests with Giant out of userret. In-Reply-To: <3C720859.C77590F0@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG exactly On Tue, 19 Feb 2002, Terry Lambert wrote: > 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