On Fri, Jan 05, 2007 at 12:23:04PM -0700, Matthew Wilcox wrote:
> On Fri, Jan 05, 2007 at 02:10:06PM -0500, Erez Zadok wrote:
> > Ah, ok.  So why not put an ASSERT in there, or at least a comment, to make
> > the code clearer.  As it stands, anyone looking at the code in the future
> > can easily rediscover this "bug" that dereferences a null ptr.
> 
> Because anyone poking in the VFS should take the time to understand
> how it works?  Adding crap like BUG_ON(!nd) is pointless -- you don't
> get a clearer backtrace from that than you do from a null pointer.

Except that a BUG_ON makes the author's intent clear and a NULL
pointer deref doesn't. Sure, anyone poking around in the VFS should
understand how it works. That doesn't mean whoever poked there before
can't leave trail marks.

Cheers,
Muli
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to