From owner-freebsd-current Fri Feb 22 23:40:25 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by hub.freebsd.org (Postfix) with ESMTP id A86B437B417; Fri, 22 Feb 2002 23:40:17 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020223074017.TFGU1214.rwcrmhc54.attbi.com@InterJet.elischer.org>; Sat, 23 Feb 2002 07:40:17 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA77184; Fri, 22 Feb 2002 23:28:58 -0800 (PST) Date: Fri, 22 Feb 2002 23:28:58 -0800 (PST) From: Julian Elischer To: John Baldwin Cc: current@FreeBSD.org, dillon@FreeBSD.org Subject: RE: First (easy) td_ucred patch In-Reply-To: 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 I can't look at it till tomorrow. But I've been watching. I'd be surprised if anything broke with what I've seen. I'll look at it then if you haven;t commited by then. On Sat, 23 Feb 2002, John Baldwin wrote: > > On 23-Feb-02 John Baldwin wrote: > > I'm currently testing the following patch whcih is a subset of the td_ucred > > changes. It involves no API changes, but only contains 2 basic changes: > > > > 1) We still need Giant when doing the crhold() to set td_ucred in > > cred_update_thread(). This is an old bug that is my fault. I knew that > > PROC_LOCK was sufficient yet which was my reason for not using td_ucred. > > However, we could still be derferencing a stale p_ucred and doing very bad > > things, so this needs to be fixed until p_ucred is fully protected by the > > PROC_LOCK. This also means that td_ucred is now safe to use. As such: > > > > 2) All the "easy" p->p_ucred -> td->td_ucred changes that don't involve the > > changes to API's such as suser() and p_canfoo(). The next patch in this > > series will most likely be the suser() API change. > > > > http://www.FreeBSD.org/~jhb/patches/ucred.patch > > To apply this patch, use -p6 like so: > > cd work/my/kernel/tree/sys > patch -p6 < path/to/patch/file/ucred.patch > > -- > > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message