Re: [PATCH 4/12: eCryptfs] Main module functions

From: Pekka Enberg
Date: Sun Nov 20 2005 - 14:12:03 EST

Hi Anton,

On 11/19/05, Phillip Hellewell <phillip@xxxxxxxxxxxxxxxxxxxx> wrote:
> > > + BUG();
> > > + err = -EINVAL;
> > > + goto out;

On Sat, 19 Nov 2005, Pekka Enberg wrote:
> > Why do you want to BUG() and then handle the situation?

On Sun, 2005-11-20 at 15:34 +0000, Anton Altaparmakov wrote:
> Because you can define BUG() to nothing (on embedded builds for example)
> and then you would be screwed if you don't handle the error gracefully.
> You should never assume something does not return, except perhaps a
> panic() although someone might even get rid of that one day...

You have a point but in this case, I don't understand why they don't
just handle it gracefully since they clearly can do so. Also, I was
under the impression that people who disable BUG() are knowingly taking
the risk...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at