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

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

 



On 3/7/2012 1:56 AM, David Rientjes wrote:
> On Wed, 7 Mar 2012, KOSAKI Motohiro wrote:
> 
>> So, I strongly suggest to remove CONFIG_BUG=n. It is neglected very long time
>> and
>> much plenty code assume BUG() is not no-op. I don't think we can fix all
>> place.
>>
>> Just one instruction don't hurt code size nor performance.
> 
> 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.


--
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]