From owner-freebsd-current Sat Feb 23 8:48: 5 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 2B6C137B400 for ; Sat, 23 Feb 2002 08:47:59 -0800 (PST) Received: (qmail 11518 invoked from network); 23 Feb 2002 16:47:57 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([65.90.110.184]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 23 Feb 2002 16:47:57 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020223044503.C27577@locore.ca> Date: Sat, 23 Feb 2002 11:47:57 -0500 (EST) From: John Baldwin To: Jake Burkholder Subject: Re: First (easy) td_ucred patch Cc: current@FreeBSD.ORG, dillon@FreeBSD.ORG 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 On 23-Feb-02 Jake Burkholder wrote: > Apparently, On Fri, Feb 22, 2002 at 11:38:07PM -0500, > John Baldwin said words to the effect of; > >> 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 > > The UGAR changes in sysv_sem.c to not leak Giant are most unreleated and > should probably be committed separately. I wonder who introduced the leaks > in the first place. Yes. The first change will also be a separate commit. > Other than that I don't see anything wrong with this. Commit it. > > Jake -- 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