diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-04-08 17:26:21 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-08 17:26:21 -0400 |
commit | 462b69b1e43ceccab68a47d65b1e46520cd0fdc0 (patch) | |
tree | 3c961fcb5889c5ab14ab36d8ef7421fc96c95959 /kernel/module.c | |
parent | d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc (diff) | |
parent | f22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff) |
Merge branch 'linus' into irq/core to get the GIC updates which
conflict with pending GIC changes.
Conflicts:
drivers/usb/isp1760/isp1760-core.c
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/module.c b/kernel/module.c index b34813f725e9..99fdf94efce8 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <linux/async.h> | 56 | #include <linux/async.h> |
57 | #include <linux/percpu.h> | 57 | #include <linux/percpu.h> |
58 | #include <linux/kmemleak.h> | 58 | #include <linux/kmemleak.h> |
59 | #include <linux/kasan.h> | ||
60 | #include <linux/jump_label.h> | 59 | #include <linux/jump_label.h> |
61 | #include <linux/pfn.h> | 60 | #include <linux/pfn.h> |
62 | #include <linux/bsearch.h> | 61 | #include <linux/bsearch.h> |
@@ -1814,7 +1813,6 @@ static void unset_module_init_ro_nx(struct module *mod) { } | |||
1814 | void __weak module_memfree(void *module_region) | 1813 | void __weak module_memfree(void *module_region) |
1815 | { | 1814 | { |
1816 | vfree(module_region); | 1815 | vfree(module_region); |
1817 | kasan_module_free(module_region); | ||
1818 | } | 1816 | } |
1819 | 1817 | ||
1820 | void __weak module_arch_cleanup(struct module *mod) | 1818 | void __weak module_arch_cleanup(struct module *mod) |
@@ -1867,7 +1865,7 @@ static void free_module(struct module *mod) | |||
1867 | kfree(mod->args); | 1865 | kfree(mod->args); |
1868 | percpu_modfree(mod); | 1866 | percpu_modfree(mod); |
1869 | 1867 | ||
1870 | /* Free lock-classes: */ | 1868 | /* Free lock-classes; relies on the preceding sync_rcu(). */ |
1871 | lockdep_free_key_range(mod->module_core, mod->core_size); | 1869 | lockdep_free_key_range(mod->module_core, mod->core_size); |
1872 | 1870 | ||
1873 | /* Finally, free the core (containing the module structure) */ | 1871 | /* Finally, free the core (containing the module structure) */ |
@@ -2313,11 +2311,13 @@ static void layout_symtab(struct module *mod, struct load_info *info) | |||
2313 | info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1); | 2311 | info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1); |
2314 | info->stroffs = mod->core_size = info->symoffs + ndst * sizeof(Elf_Sym); | 2312 | info->stroffs = mod->core_size = info->symoffs + ndst * sizeof(Elf_Sym); |
2315 | mod->core_size += strtab_size; | 2313 | mod->core_size += strtab_size; |
2314 | mod->core_size = debug_align(mod->core_size); | ||
2316 | 2315 | ||
2317 | /* Put string table section at end of init part of module. */ | 2316 | /* Put string table section at end of init part of module. */ |
2318 | strsect->sh_flags |= SHF_ALLOC; | 2317 | strsect->sh_flags |= SHF_ALLOC; |
2319 | strsect->sh_entsize = get_offset(mod, &mod->init_size, strsect, | 2318 | strsect->sh_entsize = get_offset(mod, &mod->init_size, strsect, |
2320 | info->index.str) | INIT_OFFSET_MASK; | 2319 | info->index.str) | INIT_OFFSET_MASK; |
2320 | mod->init_size = debug_align(mod->init_size); | ||
2321 | pr_debug("\t%s\n", info->secstrings + strsect->sh_name); | 2321 | pr_debug("\t%s\n", info->secstrings + strsect->sh_name); |
2322 | } | 2322 | } |
2323 | 2323 | ||
@@ -3349,9 +3349,6 @@ static int load_module(struct load_info *info, const char __user *uargs, | |||
3349 | module_bug_cleanup(mod); | 3349 | module_bug_cleanup(mod); |
3350 | mutex_unlock(&module_mutex); | 3350 | mutex_unlock(&module_mutex); |
3351 | 3351 | ||
3352 | /* Free lock-classes: */ | ||
3353 | lockdep_free_key_range(mod->module_core, mod->core_size); | ||
3354 | |||
3355 | /* we can't deallocate the module until we clear memory protection */ | 3352 | /* we can't deallocate the module until we clear memory protection */ |
3356 | unset_module_init_ro_nx(mod); | 3353 | unset_module_init_ro_nx(mod); |
3357 | unset_module_core_ro_nx(mod); | 3354 | unset_module_core_ro_nx(mod); |
@@ -3375,6 +3372,9 @@ static int load_module(struct load_info *info, const char __user *uargs, | |||
3375 | synchronize_rcu(); | 3372 | synchronize_rcu(); |
3376 | mutex_unlock(&module_mutex); | 3373 | mutex_unlock(&module_mutex); |
3377 | free_module: | 3374 | free_module: |
3375 | /* Free lock-classes; relies on the preceding sync_rcu() */ | ||
3376 | lockdep_free_key_range(mod->module_core, mod->core_size); | ||
3377 | |||
3378 | module_deallocate(mod, info); | 3378 | module_deallocate(mod, info); |
3379 | free_copy: | 3379 | free_copy: |
3380 | free_copy(info); | 3380 | free_copy(info); |