On 05/06/17 23:50, Tetsuo Handa wrote: > Casey Schaufler wrote: [...] >> I don't care for calling this "security debug". Making >> the lists writable after init isn't about development, >> it's about (Tetsuo's desire for) dynamic module loading. >> I would prefer "dynamic_module_lists" our something else >> more descriptive. > > Maybe dynamic_lsm ? ok, apologies for misunderstanding, I'll fix it. I am not sure I understood what exactly the use case is: -1) loading off-tree modules -2) loading and unloading modules -3) something else ? I'm asking this because I now wonder if I should provide means for protecting the heads later on (which still can make sense for case 1). Or if it's expected that things will stay fluid and this dynamic loading is matched by unloading, therefore the heads must stay writable (case 2) [...] >>> + if (!sec_pool) >>> + goto error_pool; >> >> Excessive gotoing - return -ENOMEM instead. > > But does it make sense to continue? > hook_heads == NULL and we will oops as soon as > call_void_hook() or call_int_hook() is called for the first time. Shouldn't the caller check for result? -ENOMEM gives it a chance to do so. I can replace the goto. --- igor -- 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>