kernel: update kernel 3.18 to version 3.18.43
[openwrt/openwrt.git] / target / linux / generic / patches-3.18 / 099-module_arch_freeing_init-new-hook-for-archs-before-m.patch
index 05cb2585ed4ed4875061b7f9a7851d4b3c3a6563..352bf6de157a951a2b088f684f21d60894acfdbb 100644 (file)
@@ -122,7 +122,7 @@ Origin: backport, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
 +      mod->arch.syminfo = NULL;
  }
  
- static void
+ static void check_rela(Elf_Rela *rela, struct module *me)
 --- a/arch/tile/kernel/module.c
 +++ b/arch/tile/kernel/module.c
 @@ -83,7 +83,7 @@ void module_free(struct module *mod, voi
@@ -136,7 +136,7 @@ Origin: backport, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
  }
 --- a/include/linux/moduleloader.h
 +++ b/include/linux/moduleloader.h
-@@ -80,4 +80,6 @@ int module_finalize(const Elf_Ehdr *hdr,
+@@ -82,4 +82,6 @@ int module_finalize(const Elf_Ehdr *hdr,
  /* Any cleanup needed when module leaves. */
  void module_arch_cleanup(struct module *mod);
  
@@ -145,7 +145,7 @@ Origin: backport, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
  #endif
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -1855,6 +1855,10 @@ void __weak module_arch_cleanup(struct m
+@@ -1840,6 +1840,10 @@ void __weak module_arch_cleanup(struct m
  {
  }
  
@@ -156,7 +156,7 @@ Origin: backport, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
  /* Free a module, remove from lists, etc. */
  static void free_module(struct module *mod)
  {
-@@ -1880,6 +1884,7 @@ static void free_module(struct module *m
+@@ -1872,6 +1876,7 @@ static void free_module(struct module *m
  
        /* This may be NULL, but that's OK */
        unset_module_init_ro_nx(mod);
@@ -164,7 +164,7 @@ Origin: backport, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
        module_free(mod, mod->module_init);
        kfree(mod->args);
        percpu_modfree(mod);
-@@ -2983,6 +2988,7 @@ out:
+@@ -2983,6 +2988,7 @@ static struct module *layout_and_allocat
  static void module_deallocate(struct module *mod, struct load_info *info)
  {
        percpu_modfree(mod);
@@ -172,8 +172,8 @@ Origin: backport, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
        module_free(mod, mod->module_init);
        module_free(mod, mod->module_core);
  }
-@@ -3122,6 +3128,7 @@ static int do_init_module(struct module
-       mod->strtab = mod->core_strtab;
+@@ -3105,6 +3111,7 @@ static int do_init_module(struct module
+       rcu_assign_pointer(mod->kallsyms, &mod->core_kallsyms);
  #endif
        unset_module_init_ro_nx(mod);
 +      module_arch_freeing_init(mod);