aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpu.c2
-rw-r--r--kernel/module.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 8b92539b4754..97d1b426a4ac 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -34,7 +34,7 @@ void cpu_maps_update_done(void)
34 mutex_unlock(&cpu_add_remove_lock); 34 mutex_unlock(&cpu_add_remove_lock);
35} 35}
36 36
37static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain); 37static RAW_NOTIFIER_HEAD(cpu_chain);
38 38
39/* If set, cpu_up and cpu_down will return -EBUSY and do nothing. 39/* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
40 * Should always be manipulated under cpu_add_remove_lock 40 * Should always be manipulated under cpu_add_remove_lock
diff --git a/kernel/module.c b/kernel/module.c
index 333fbcc96978..0129769301e3 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -403,7 +403,7 @@ static unsigned int find_pcpusec(Elf_Ehdr *hdr,
403 Elf_Shdr *sechdrs, 403 Elf_Shdr *sechdrs,
404 const char *secstrings) 404 const char *secstrings)
405{ 405{
406 return find_sec(hdr, sechdrs, secstrings, ".data.percpu"); 406 return find_sec(hdr, sechdrs, secstrings, ".data..percpu");
407} 407}
408 408
409static void percpu_modcopy(struct module *mod, 409static void percpu_modcopy(struct module *mod,
@@ -2014,6 +2014,7 @@ static noinline struct module *load_module(void __user *umod,
2014 long err = 0; 2014 long err = 0;
2015 void *ptr = NULL; /* Stops spurious gcc warning */ 2015 void *ptr = NULL; /* Stops spurious gcc warning */
2016 unsigned long symoffs, stroffs, *strmap; 2016 unsigned long symoffs, stroffs, *strmap;
2017 void __percpu *percpu;
2017 2018
2018 mm_segment_t old_fs; 2019 mm_segment_t old_fs;
2019 2020
@@ -2158,6 +2159,8 @@ static noinline struct module *load_module(void __user *umod,
2158 goto free_mod; 2159 goto free_mod;
2159 sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; 2160 sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
2160 } 2161 }
2162 /* Keep this around for failure path. */
2163 percpu = mod_percpu(mod);
2161 2164
2162 /* Determine total sizes, and put offsets in sh_entsize. For now 2165 /* Determine total sizes, and put offsets in sh_entsize. For now
2163 this is done generically; there doesn't appear to be any 2166 this is done generically; there doesn't appear to be any
@@ -2463,7 +2466,7 @@ static noinline struct module *load_module(void __user *umod,
2463 module_free(mod, mod->module_core); 2466 module_free(mod, mod->module_core);
2464 /* mod will be freed with core. Don't access it beyond this line! */ 2467 /* mod will be freed with core. Don't access it beyond this line! */
2465 free_percpu: 2468 free_percpu:
2466 percpu_modfree(mod); 2469 free_percpu(percpu);
2467 free_mod: 2470 free_mod:
2468 kfree(args); 2471 kfree(args);
2469 kfree(strmap); 2472 kfree(strmap);