Date: Fri, 22 Feb 2002 04:15:35 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Julian Elischer <julian@elischer.org>, arch@FreeBSD.org Subject: Re: RE: that INVARIANT/ucred freeing stuff. Message-ID: <XFMail.020222041535.jhb@FreeBSD.org> In-Reply-To: <200202220539.g1M5ddM13773@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22-Feb-02 Matthew Dillon wrote: >:Fine, stick it under DIAGNOSTIC (which isn't dead.) The problem is that >:there >:aren't just 5 places in the kernel that you would need to stick this assert, >:you would need it all over the place. But I guess no one else has looked at >:all the places that p_ucred is used and thought about how to ensure we don't >:use a bogus td_ucred. >: >: >:John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ > > Don't try to overengineer the problem. Unless you believe there is > a serious problem, there is no need to put a check in every single > conceivable place an error might occur. Just putting a few safety checks > in a few critical places should be sufficient. I don't know where all the places we might look at a ucred wrongly are. That's why I wanted the much simpler solution of just clearing td_ucred to NULL so we had an implicit KASSERT for us in all those places. > -Matt > Matthew Dillon > <dillon@backplane.com> -- 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-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020222041535.jhb>