Subject: Re: CVS commit: src/sys/dev
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Tom Spindler <dogcow@babymeat.com>
List: source-changes
Date: 03/21/2006 02:20:45
> At last this should be changed to a KASSERT(). Or it may be removed;
> we know that this ioctl won't ever be called without a lwp. We may want to
> add a KASSERT() to help detect regressions, but then it should also be added to
> others ioctls that needs a lwp (I think it's all of them but DIOCGDINFO,
> ODIOCGDINFO, DIOCGPART, and maybe DIOCGDEFLABEL, ODIOCGDEFLABEL, and of course
> default).

I've gone through this time and looked for all occurences of the use
of the possibly-NULL l, and KASSERTed them.

> Coverity can't detect properly this kind of situation, and will give a
> false positive. Adding code to appease coverity in such a case is IMHO wrong.

I've seen way too much code for which people have claimed 'this
condition can't possibly happen' and were proven wrong.