aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 68be0b1f9e7f..1f85fd5c89d3 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1795,7 +1795,7 @@ static void unset_module_core_ro_nx(struct module *mod) { }
1795static void unset_module_init_ro_nx(struct module *mod) { } 1795static void unset_module_init_ro_nx(struct module *mod) { }
1796#endif 1796#endif
1797 1797
1798void __weak module_free(struct module *mod, void *module_region) 1798void __weak module_memfree(void *module_region)
1799{ 1799{
1800 vfree(module_region); 1800 vfree(module_region);
1801} 1801}
@@ -1846,7 +1846,7 @@ static void free_module(struct module *mod)
1846 /* This may be NULL, but that's OK */ 1846 /* This may be NULL, but that's OK */
1847 unset_module_init_ro_nx(mod); 1847 unset_module_init_ro_nx(mod);
1848 module_arch_freeing_init(mod); 1848 module_arch_freeing_init(mod);
1849 module_free(mod, mod->module_init); 1849 module_memfree(mod->module_init);
1850 kfree(mod->args); 1850 kfree(mod->args);
1851 percpu_modfree(mod); 1851 percpu_modfree(mod);
1852 1852
@@ -1855,7 +1855,7 @@ static void free_module(struct module *mod)
1855 1855
1856 /* Finally, free the core (containing the module structure) */ 1856 /* Finally, free the core (containing the module structure) */
1857 unset_module_core_ro_nx(mod); 1857 unset_module_core_ro_nx(mod);
1858 module_free(mod, mod->module_core); 1858 module_memfree(mod->module_core);
1859 1859
1860#ifdef CONFIG_MPU 1860#ifdef CONFIG_MPU
1861 update_protections(current->mm); 1861 update_protections(current->mm);
@@ -2790,7 +2790,7 @@ static int move_module(struct module *mod, struct load_info *info)
2790 */ 2790 */
2791 kmemleak_ignore(ptr); 2791 kmemleak_ignore(ptr);
2792 if (!ptr) { 2792 if (!ptr) {
2793 module_free(mod, mod->module_core); 2793 module_memfree(mod->module_core);
2794 return -ENOMEM; 2794 return -ENOMEM;
2795 } 2795 }
2796 memset(ptr, 0, mod->init_size); 2796 memset(ptr, 0, mod->init_size);
@@ -2936,8 +2936,8 @@ static void module_deallocate(struct module *mod, struct load_info *info)
2936{ 2936{
2937 percpu_modfree(mod); 2937 percpu_modfree(mod);
2938 module_arch_freeing_init(mod); 2938 module_arch_freeing_init(mod);
2939 module_free(mod, mod->module_init); 2939 module_memfree(mod->module_init);
2940 module_free(mod, mod->module_core); 2940 module_memfree(mod->module_core);
2941} 2941}
2942 2942
2943int __weak module_finalize(const Elf_Ehdr *hdr, 2943int __weak module_finalize(const Elf_Ehdr *hdr,
@@ -3062,7 +3062,7 @@ static int do_init_module(struct module *mod)
3062#endif 3062#endif
3063 unset_module_init_ro_nx(mod); 3063 unset_module_init_ro_nx(mod);
3064 module_arch_freeing_init(mod); 3064 module_arch_freeing_init(mod);
3065 module_free(mod, mod->module_init); 3065 module_memfree(mod->module_init);
3066 mod->module_init = NULL; 3066 mod->module_init = NULL;
3067 mod->init_size = 0; 3067 mod->init_size = 0;
3068 mod->init_ro_size = 0; 3068 mod->init_ro_size = 0;