From owner-freebsd-current Mon Feb 11 19:48:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from newman2.bestweb.net (newman2.bestweb.net [209.94.102.67]) by hub.freebsd.org (Postfix) with ESMTP id 6027837B655 for ; Mon, 11 Feb 2002 18:19:12 -0800 (PST) Received: from okeeffe.bestweb.net (okeefe.bestweb.net [209.94.100.110]) by newman2.bestweb.net (Postfix) with ESMTP id A0C8322FEC; Mon, 11 Feb 2002 21:18:07 -0500 (EST) Received: by okeeffe.bestweb.net (Postfix, from userid 0) id 97F029F3DD; Mon, 11 Feb 2002 21:12:46 -0500 (EST) 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 Message-Id: <20020212021246.97F029F3DD@okeeffe.bestweb.net> 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message