svn commit: r185309 - head/sys/geom/vinum

Ulf Lilleengen lulf at FreeBSD.org
Tue Nov 25 12:14:39 PST 2008


On Tue, Nov 25, 2008 at 08:20:48PM +0100, Rink Springer wrote:
> On Tue, Nov 25, 2008 at 07:13:58PM +0000, Ulf Lilleengen wrote:
> > Author: lulf
> > Date: Tue Nov 25 19:13:58 2008
> > New Revision: 185309
> > URL: http://svn.freebsd.org/changeset/base/185309
> > 
> > Log:
> >   - Fix a potential NULL pointer reference. Note that this cannot happen in
> >     practice, but it is a good programming practice nontheless and it allows the
> >     kernel to not depend on userland correctness.
> 
> If it can't happen in practice, why not just ASSERT on them? This would
> be useful for debugging, and it basically tells whoever reads the code
> about the scenario's you are dealing with...
> 
Well,

As the last sentence states, I think it's nicer to make the kernel part as
independent of the userland part as possible, rather than panicing if the
userland part should do an error.

Also, reporting such errors back seems to be the common practice if you look
at other GEOM classes, and it's good for consistency in a way.

-- 
Ulf Lilleengen


More information about the svn-src-all mailing list