diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-12-21 08:24:24 +0100 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2024-01-29 12:00:31 -0800 |
commit | 3559ad395bf02f3dee576dc9acab4ce330ce57b5 (patch) | |
tree | 26cda2aea32a4b592c28723953e20035e7283492 /kernel/module/main.c | |
parent | ac88ee7d2b87c1f93b89fd9ce5911c2ab2bda816 (diff) |
module: Change module_enable_{nx/x/ro}() to more explicit names
It's a bit puzzling to see a call to module_enable_nx() followed by a
call to module_enable_x(). This is because one applies on text while
the other applies on data.
Change name to make that more clear.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/main.c')
-rw-r--r-- | kernel/module/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c index 2e0187e16669..a9a4a4885102 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2571,7 +2571,7 @@ static noinline int do_init_module(struct module *mod) /* Switch to core kallsyms now init is done: kallsyms may be walking! */ rcu_assign_pointer(mod->kallsyms, &mod->core_kallsyms); #endif - module_enable_ro(mod, true); + module_enable_rodata_ro(mod, true); mod_tree_remove_init(mod); module_arch_freeing_init(mod); for_class_mod_mem_type(type, init) { @@ -2736,9 +2736,9 @@ static int complete_formation(struct module *mod, struct load_info *info) module_bug_finalize(info->hdr, info->sechdrs, mod); module_cfi_finalize(info->hdr, info->sechdrs, mod); - module_enable_ro(mod, false); - module_enable_nx(mod); - module_enable_rox(mod); + module_enable_rodata_ro(mod, false); + module_enable_data_nx(mod); + module_enable_text_rox(mod); /* * Mark state as coming so strong_try_module_get() ignores us, |