PATCH: Fix crash case
If we are going to BUG() not panic() here then we should cover the case of the BUG being compiled out
kernel/exit.c +2 -1
@@ -979,7 +979,8 @@schedule ();BUG ();/* Avoid "noreturn function does return". */ -for (;;) ; +for (;;) +cpu_relax ();/* For when BUG is null */ }EXPORT_SYMBOL_GPL (do_exit);
Quoted 3 lines
If we are going to
BUG()notpanic()here then we should cover the case of the BUG being compiled out
Bug can be compiled out? Ah well I much rather like this patch because of the previous busy-looping, heating CPUs unnecessarily. (There was a thread, about that, too.)
Jan Engelhardt
Sorry for being a noob here - I read LKML to try to learn.
What is meant by 'If we are going to BUG()... cover the case of the BUG being compiled out'.
What would make BUG(); not being compiled?
Nick
Quoted 6 lines · Nick Warne
Sorry for being a noob here - I read LKML to try to learn.
What is meant by 'If we are going to
BUG()... cover the case of the BUG being compiled out'.What would make
BUG(); not being compiled?
It's a config option is EMBEDDED=y:
config BUG
bool "BUG() support" if EMBEDDED
default y
help
Disabling this option eliminates support for BUG and WARN, reducing the size of your kernel image and potentially quietly ignoring numerous fatal conditions. You should only consider disabling this option for embedded systems with no facilities for reporting errors. Just say Y.
Signature · 1 line
~Randy
Quoted 9 lines · Randy.Dunlap
Quoted 6 lines
Sorry for being a noob here - I read LKML to try to learn.
What is meant by 'If we are going to
BUG()... cover the case of the BUG being compiled out'.What would make
BUG(); not being compiled?It's a config option is EMBEDDED=y:
Ah! That option. OK, thanks.
Nick
Signature · 2 lines
Every program has two purposes: one for which it was written and another for which it wasn't.
Quoted 6 lines · Jan Engelhardt
Quoted 2 lines
If we are going to
BUG()notpanic()here then we should cover the case of the BUG being compiled outBug can be compiled out? Ah well I much rather like this patch because of the previous busy-looping, heating CPUs unnecessarily. (There was a thread, about that, too.)
cpu_relax() is on most CPUs as busy as a ";". This often annoys me too (in particular in panic) when the CPU fans spin up and machines become noisy. Maybe we need a portable halt() macro.
-Andi