From: Jan Glauber Date: Thu, 19 May 2011 22:55:25 +0000 (-0600) Subject: module: zero mod->init_ro_size after init is freed. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4d10380e720a3ce19dbe88d0133f66ded07b6a8f;p=linux-beck.git module: zero mod->init_ro_size after init is freed. Reset mod->init_ro_size to zero after the init part of a module is unloaded. Otherwise we need to check if module->init is NULL in the unprotect functions in the next patch. Signed-off-by: Jan Glauber Signed-off-by: Rusty Russell --- diff --git a/kernel/module.c b/kernel/module.c index 523c40b71777..92112c91b7e9 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2935,6 +2935,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, module_free(mod, mod->module_init); mod->module_init = NULL; mod->init_size = 0; + mod->init_ro_size = 0; mod->init_text_size = 0; mutex_unlock(&module_mutex);