Date: Mon, 11 Feb 2002 09:49:49 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.ORG, Julian Elischer <julian@elischer.org> Subject: Re: final ucred patch Message-ID: <XFMail.020211094949.jhb@FreeBSD.org> In-Reply-To: <20020211060831.T9036-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020211094949.jhb>
