From owner-freebsd-current Mon Feb 11 6:50:15 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id 878AF37B484 for ; Mon, 11 Feb 2002 06:49:53 -0800 (PST) Received: (qmail 6132 invoked from network); 11 Feb 2002 14:49:52 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([65.90.117.36]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Feb 2002 14:49:52 -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: <20020211060831.T9036-100000@gamplex.bde.org> Date: Mon, 11 Feb 2002 09:49:49 -0500 (EST) From: John Baldwin To: Bruce Evans Subject: Re: final ucred patch Cc: current@FreeBSD.ORG, Julian Elischer 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 10-Feb-02 Bruce Evans wrote: >> + } >> + if (p->p_ucred) { > > How can this be NULL? The old code didn't check. Agreed. Julian, can you take it out and replace it with a KASSERT() instead and then get a traceback of the panic? >> switch (type) { >> case T_PRIVINFLT: /* privileged instruction fault */ >> @@ -644,10 +654,12 @@ >> userret(td, &frame, sticks); >> mtx_assert(&Giant, MA_NOTOWNED); >> userout: >> +#ifdef INVARIANTS >> mtx_lock(&Giant); >> crfree(td->td_ucred); >> - mtx_unlock(&Giant); >> td->td_ucred = NULL; >> + mtx_unlock(&Giant); >> +#endif >> out: >> return; >> } > > I think moving the unlock is just an obfuscation. td_ucred isn't locked > by Giant. Yep, definitely agree. > Bruce -- 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