On 05/23/2013 06:59 PM, Arnd Bergmann wrote: > You don't just want to avoid the code for printing the bug message and > the invalid instruction, we also want the compiler to not emit the > function call or check the enum for unexpected values. The meaning of > BUG() is really that person writing that statement was sure it cannot > happen unless there is a bug in the kernel, which has likely already > corrupted data. Printing a diagnostic at this point is nice if someone > is there to look at it, but letting the kernel do further actions that > may be undefined is not going to make things worse.
So I think neither unreachable() nor panic() are suitable for this condition. I guess 'CONFIG_BUG' is not belong to common features, now (and in the future), so it is not suitable still exist in "asm-generic/bug.h", need remove it firstly. And then let the specific architectures to implement their own BUG(), if they want some special features. SO most of arches can skip this issue. Thanks. -- Chen Gang Asianux Corporation ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel