aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2011-05-19 18:55:25 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-05-19 03:25:26 -0400
commit4d10380e720a3ce19dbe88d0133f66ded07b6a8f (patch)
tree9c652a201f13d67be5671a45e9815c7e7e3b4e0e /kernel/module.c
parent5d05c70849f760ac8f4ed3ebfeefb92689858834 (diff)
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 <jang@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 523c40b7177..92112c91b7e 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2935,6 +2935,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
2935 module_free(mod, mod->module_init); 2935 module_free(mod, mod->module_init);
2936 mod->module_init = NULL; 2936 mod->module_init = NULL;
2937 mod->init_size = 0; 2937 mod->init_size = 0;
2938 mod->init_ro_size = 0;
2938 mod->init_text_size = 0; 2939 mod->init_text_size = 0;
2939 mutex_unlock(&module_mutex); 2940 mutex_unlock(&module_mutex);
2940 2941