tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c



On Mon, Jan 21, 2019 at 04:24:49PM -0500, Greg Troxel wrote:
> Separetaly from debug code being careful, if it's a rule that bdv can't
> be NULL, it's just as well to put in a KASSERT.  Then we'll find out
> where that isn't true and can fix it.

I must not be getting something.  If rf_containsboot() is passed a NULL
pointer, it will trap with a page fault and we can get a stacktrace from
ddb.  If we add a KASSERT it will panic and we can get a stacktrace from
ddb.  I don't see where the benefit in that is.

Do you think we should add a KASSERT to document that rf_containsboot()
does expect a valid pointer? I'd see value in that and would go ahead with
it.

--chris


Home | Main Index | Thread Index | Old Index