Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.5.34

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Tue Sep 10 2002 - 12:16:03 EST


Linus Torvalds wrote:
> On Tue, 10 Sep 2002, David Brownell wrote:
>
>>>In short:
>>>
>>> Either you want debugging (in which case BUG() is the wrong thing to
>>> do), or you don't want debugging (in which case BUG() is the wrong thing
>>> to do). You can choose either, but in neither case is BUG() acceptable.
>>
>>Or in even shorter sound bite format: "Just say no to BUG()s."
>
>
> Well, the thing is, BUG() _is_ sometimes useful. It's a dense and very
> convenient way to say that something catastrophic happened.
>
> And actually, outside of drivers and filesystems you can often know (or
> control) the number of locks the surrounding code is holding, and then a
> BUG() may not be as lethal. At which point the normal "oops and kill the
> process" action is clearly fine - the machine is still perfectly usable.

I know you probably don't like the name, but all over the kernel people
are using BUG() as ASSERT()... so why not create what people want?

IMO we should have ASSERT() and OHSHIT(), the latter being the true
meaning and current implementation of BUG(), the former being used when
the machine is still useable.

        Jeff

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



This archive was generated by hypermail 2b29 : Sun Sep 15 2002 - 22:00:21 EST