On Wed, 11 Sep 2013, KOSAKI Motohiro wrote: > At least, currently mpol_to_str() already have following assertion. I mean, > the code assume every developer know maximum length of mempolicy. I have no > seen any reason to bring addional complication to shmem area. > > > /* > * Sanity check: room for longest mode, flag and some nodes > */ > VM_BUG_ON(maxlen < strlen("interleave") + strlen("relative") + 16); > No need to make it a runtime error, the value passed as maxlen is a constant, as is the use of sizeof(buffer), so the value is known at compile-time. You can make this a BUILD_BUG_ON() if you are creative. -- 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>