On Wed, 18 Sep 2013, Chen Gang wrote: > BUG_ON() is widely and commonly used in kernel wide, and BUG_ON() can be > customized by any architectures, so I guess, if google really think it > is necessary, it will customize it. > > If "compile-time error" will make code complex to both readers and > writers (e.g. our case), forcing "compile-time error" may still be good > enough to google, but may not be good enough for others. > Google has nothing to do with this, it treats BUG_ON() just like 99.99% of others do. > So in my opinion, for our case which is a common sub-system, not an > architecture specific sub-system, better use "run-time error". > That's absolutely insane. If code is not allocating enough memory for the maximum possible length of a string to be stored by mpol_to_str(), it's a bug in the code. We do not panic and reboot the user's machine for such a bug. Instead, we break the build and require the broken code to be fixed. I have told you exactly how to introduce such a compile-time error. -- 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/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>