Re: [PATCH] mm: Make it easier to catch NULL cache names

From: Benjamin Herrenschmidt
Date: Tue Jul 28 2009 - 03:39:30 EST


On Mon, 2009-07-27 at 22:01 -0700, David Rientjes wrote:
> On Tue, 28 Jul 2009, Benjamin Herrenschmidt wrote:
>
> > > Please don't do BUG_ON() when there are alternatives.
> > >
> > > In this case, something like
> > >
> > > if (WARN_ON(!name))
> > > return NULL;
> > >
> > > would probably have worked too.
> >
> > Fair enough.. I'll send a new patch.
> >
>
> Actually needs goto err, not return NULL, to appropriately panic when
> SLAB_PANIC is set.

Rats ! Why is it the trivial ones that are sooo hard :-)

New patch will have to wait til tomorrow, on my way home now.

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/