BTW: in my opinion, within mpol_to_str(), the VM_BUG_ON() need be replaced by returning -EINVAL.
Nope. mpol_to_str() is not carefully designed since it was born. It doesn't have a way to get proper buffer size. That said, the function assume all caller know proper buffer size. So, just adding EINVAL doesn't solve anything. we need to add a way to get proper buffer length at least if we take your way. However it is overengineering because current all caller doesn't need it. -- 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>