Re: [PATCH] x86: kprobes change kprobe_handler flow

From: Ingo Molnar
Date: Wed Jan 02 2008 - 15:24:20 EST



* Abhishek Sagar <sagar.abhishek@xxxxxxxxx> wrote:

> > > + default:
> > > + /* impossible cases */
> > > + BUG();
> >
> > I think no need to check that here.
>
> It may not get hit at runtime but is quite informative.

sidenote: please use WARN_ON(1) instead. In the case of the impossible
triggering somehow (the Linux kernel is notorious for that ;-), we'd
have a nice WARN_ON(1) in the dmesg, instead of a crashed box.

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