diff options
-rw-r--r-- | arch/cris/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/mips/net/bpf_jit.c | 2 | ||||
-rw-r--r-- | arch/nios2/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/powerpc/net/bpf_jit_comp.c | 2 | ||||
-rw-r--r-- | arch/sparc/net/bpf_jit_comp.c | 4 | ||||
-rw-r--r-- | arch/tile/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/ftrace.c | 2 | ||||
-rw-r--r-- | include/linux/moduleloader.h | 2 | ||||
-rw-r--r-- | kernel/bpf/core.c | 2 | ||||
-rw-r--r-- | kernel/kprobes.c | 2 | ||||
-rw-r--r-- | kernel/module.c | 14 |
11 files changed, 18 insertions, 18 deletions
diff --git a/arch/cris/kernel/module.c b/arch/cris/kernel/module.c index 51123f985eb5..af04cb6b6dc9 100644 --- a/arch/cris/kernel/module.c +++ b/arch/cris/kernel/module.c | |||
@@ -36,7 +36,7 @@ void *module_alloc(unsigned long size) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* Free memory returned from module_alloc */ | 38 | /* Free memory returned from module_alloc */ |
39 | void module_free(struct module *mod, void *module_region) | 39 | void module_memfree(void *module_region) |
40 | { | 40 | { |
41 | kfree(module_region); | 41 | kfree(module_region); |
42 | } | 42 | } |
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c index 9fd6834a2172..5d6139390bf8 100644 --- a/arch/mips/net/bpf_jit.c +++ b/arch/mips/net/bpf_jit.c | |||
@@ -1388,7 +1388,7 @@ out: | |||
1388 | void bpf_jit_free(struct bpf_prog *fp) | 1388 | void bpf_jit_free(struct bpf_prog *fp) |
1389 | { | 1389 | { |
1390 | if (fp->jited) | 1390 | if (fp->jited) |
1391 | module_free(NULL, fp->bpf_func); | 1391 | module_memfree(fp->bpf_func); |
1392 | 1392 | ||
1393 | bpf_prog_unlock_free(fp); | 1393 | bpf_prog_unlock_free(fp); |
1394 | } | 1394 | } |
diff --git a/arch/nios2/kernel/module.c b/arch/nios2/kernel/module.c index cc924a38f22a..e2e3f13f98d5 100644 --- a/arch/nios2/kernel/module.c +++ b/arch/nios2/kernel/module.c | |||
@@ -36,7 +36,7 @@ void *module_alloc(unsigned long size) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* Free memory returned from module_alloc */ | 38 | /* Free memory returned from module_alloc */ |
39 | void module_free(struct module *mod, void *module_region) | 39 | void module_memfree(void *module_region) |
40 | { | 40 | { |
41 | kfree(module_region); | 41 | kfree(module_region); |
42 | } | 42 | } |
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 1ca125b9c226..d1916b577f2c 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c | |||
@@ -699,7 +699,7 @@ out: | |||
699 | void bpf_jit_free(struct bpf_prog *fp) | 699 | void bpf_jit_free(struct bpf_prog *fp) |
700 | { | 700 | { |
701 | if (fp->jited) | 701 | if (fp->jited) |
702 | module_free(NULL, fp->bpf_func); | 702 | module_memfree(fp->bpf_func); |
703 | 703 | ||
704 | bpf_prog_unlock_free(fp); | 704 | bpf_prog_unlock_free(fp); |
705 | } | 705 | } |
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index f33e7c7a3bf7..7931eeeb649a 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -776,7 +776,7 @@ cond_branch: f_offset = addrs[i + filter[i].jf]; | |||
776 | if (unlikely(proglen + ilen > oldproglen)) { | 776 | if (unlikely(proglen + ilen > oldproglen)) { |
777 | pr_err("bpb_jit_compile fatal error\n"); | 777 | pr_err("bpb_jit_compile fatal error\n"); |
778 | kfree(addrs); | 778 | kfree(addrs); |
779 | module_free(NULL, image); | 779 | module_memfree(image); |
780 | return; | 780 | return; |
781 | } | 781 | } |
782 | memcpy(image + proglen, temp, ilen); | 782 | memcpy(image + proglen, temp, ilen); |
@@ -822,7 +822,7 @@ out: | |||
822 | void bpf_jit_free(struct bpf_prog *fp) | 822 | void bpf_jit_free(struct bpf_prog *fp) |
823 | { | 823 | { |
824 | if (fp->jited) | 824 | if (fp->jited) |
825 | module_free(NULL, fp->bpf_func); | 825 | module_memfree(fp->bpf_func); |
826 | 826 | ||
827 | bpf_prog_unlock_free(fp); | 827 | bpf_prog_unlock_free(fp); |
828 | } | 828 | } |
diff --git a/arch/tile/kernel/module.c b/arch/tile/kernel/module.c index 62a597e810d6..2305084c9b93 100644 --- a/arch/tile/kernel/module.c +++ b/arch/tile/kernel/module.c | |||
@@ -74,7 +74,7 @@ error: | |||
74 | 74 | ||
75 | 75 | ||
76 | /* Free memory returned from module_alloc */ | 76 | /* Free memory returned from module_alloc */ |
77 | void module_free(struct module *mod, void *module_region) | 77 | void module_memfree(void *module_region) |
78 | { | 78 | { |
79 | vfree(module_region); | 79 | vfree(module_region); |
80 | 80 | ||
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 2142376dc8c6..8b7b0a51e742 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -674,7 +674,7 @@ static inline void *alloc_tramp(unsigned long size) | |||
674 | } | 674 | } |
675 | static inline void tramp_free(void *tramp) | 675 | static inline void tramp_free(void *tramp) |
676 | { | 676 | { |
677 | module_free(NULL, tramp); | 677 | module_memfree(tramp); |
678 | } | 678 | } |
679 | #else | 679 | #else |
680 | /* Trampolines can only be created if modules are supported */ | 680 | /* Trampolines can only be created if modules are supported */ |
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index 054eac853090..f7556261fe3c 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h | |||
@@ -26,7 +26,7 @@ unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section); | |||
26 | void *module_alloc(unsigned long size); | 26 | void *module_alloc(unsigned long size); |
27 | 27 | ||
28 | /* Free memory returned from module_alloc. */ | 28 | /* Free memory returned from module_alloc. */ |
29 | void module_free(struct module *mod, void *module_region); | 29 | void module_memfree(void *module_region); |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Apply the given relocation to the (simplified) ELF. Return -error | 32 | * Apply the given relocation to the (simplified) ELF. Return -error |
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; |