Subject: Re: CVS commit: src/sys/dev
To: Tom Spindler <dogcow@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: source-changes
Date: 03/18/2006 17:06:03
On Sat, Mar 18, 2006 at 01:13:24AM +0000, Tom Spindler wrote:
> 
> Module Name:	src
> Committed By:	dogcow
> Date:		Sat Mar 18 01:13:24 UTC 2006
> 
> Modified Files:
> 	src/sys/dev: vnd.c
> 
> Log Message:
> in VNDIOCGET, make sure there's a valid lwp. coverity CID 837.

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).

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.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--