Thread (16 messages) read the whole thread 16 messages, 7 authors, 2012-04-26

Re: [patch] mm, mempolicy: make mempolicies robust against errors

From: David Rientjes <rientjes@google.com>
Date: 2012-03-07 21:06:34

On Wed, 7 Mar 2012, KOSAKI Motohiro wrote:
quoted
It's a different topic, the proposal here is whether an error in 
mempolicies (either the code or flipped bit) should crash the kernel or 
not since it's a condition that can easily be recovered from and leave 
BUG() to errors that actually are fatal.  Crashing the kernel offers no 
advantage.
Should crash? The code path never reach. thus there is no ideal behavior.
In this case, BUG() is just unreachable annotation. So let's just annotate
unreachable() even though CONFIG_BUG=n.

WARN_ON_ONCE makes code broat and no positive impact.
I think you misunderstand the difference between WARN() and BUG().  Both 
are intended to never be reached; the difference is that BUG() is a fatal 
condition and WARN() is not.  All of the changes from BUG() to WARN() in 
this patch are not fatal and has no other side-effects other memory 
allocations that are not truly interleaved, for example.  These should 
have been WARN() from the beginning.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help