Re: [PATCH] Altix I/O code cleanup

From: Christoph Hellwig
Date: Fri Oct 17 2003 - 03:12:46 EST


On Thu, Oct 16, 2003 at 11:40:49AM -0500, Colin Ngam wrote:
> > to panic() on a failed kmalloc because the data structure is required
> > for a core service, then doing ASSERT_ALWAYS isn't that unreasonable.
>
> ASSERT_ALWAYS is used for many other cases other than just for
> testing NULL Pointers. Whether you call ASSERT_ALWAYS or
> call panic with a message or just allow it to oops, a descriptive panic
> message can save some time.

Of course - but that's not that point. You have to handle an out of
memory situtation propery because it may happen all the time - you
should not panic at all. The ASSERT_ALWAYS just confuses automatic
checker tools that help to find such conditions.

-
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/