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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Mar 2012, KOSAKI Motohiro wrote:

> > 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@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]