diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/core.c | 2 | ||||
-rw-r--r-- | kernel/kprobes.c | 2 | ||||
-rw-r--r-- | kernel/module.c | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index d6594e457a25..a64e7a207d2b 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c | |||
@@ -163,7 +163,7 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr, | |||
163 | 163 | ||
164 | void bpf_jit_binary_free(struct bpf_binary_header *hdr) | 164 | void bpf_jit_binary_free(struct bpf_binary_header *hdr) |
165 | { | 165 | { |
166 | module_free(NULL, hdr); | 166 | module_memfree(hdr); |
167 | } | 167 | } |
168 | #endif /* CONFIG_BPF_JIT */ | 168 | #endif /* CONFIG_BPF_JIT */ |
169 | 169 | ||
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 06f58309fed2..ee619929cf90 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -127,7 +127,7 @@ static void *alloc_insn_page(void) | |||
127 | 127 | ||
128 | static void free_insn_page(void *page) | 128 | static void free_insn_page(void *page) |
129 | { | 129 | { |
130 | module_free(NULL, page); | 130 | module_memfree(page); |
131 | } | 131 | } |
132 | 132 | ||
133 | struct kprobe_insn_cache kprobe_insn_slots = { | 133 | struct kprobe_insn_cache kprobe_insn_slots = { |
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) { } | |||
1795 | static void unset_module_init_ro_nx(struct module *mod) { } | 1795 | static void unset_module_init_ro_nx(struct module *mod) { } |
1796 | #endif | 1796 | #endif |
1797 | 1797 | ||
1798 | void __weak module_free(struct module *mod, void *module_region) | 1798 | void __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 | ||
2943 | int __weak module_finalize(const Elf_Ehdr *hdr, | 2943 | int __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; |