Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[safe/jmp/linux-2.6] / kernel / module.c
index f6e08b7..e797812 100644 (file)
@@ -1952,9 +1952,6 @@ static noinline struct module *load_module(void __user *umod,
                if (strstarts(secstrings+sechdrs[i].sh_name, ".exit"))
                        sechdrs[i].sh_flags &= ~(unsigned long)SHF_ALLOC;
 #endif
-               /* Don't keep __versions around; it's just for loading. */
-               if (strcmp(secstrings + sechdrs[i].sh_name, "__versions") == 0)
-                       sechdrs[i].sh_flags &= ~(unsigned long)SHF_ALLOC;
        }
 
        modindex = find_sec(hdr, sechdrs, secstrings,
@@ -2391,6 +2388,9 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
        blocking_notifier_call_chain(&module_notify_list,
                                     MODULE_STATE_LIVE, mod);
 
+       /* We need to finish all async code before the module init sequence is done */
+       async_synchronize_full();
+
        mutex_lock(&module_mutex);
        /* Drop initial reference. */
        module_put(mod);
@@ -2777,7 +2777,7 @@ bool is_module_address(unsigned long addr)
  * Must be called with preempt disabled or module mutex held so that
  * module doesn't get freed during this.
  */
-__notrace_funcgraph struct module *__module_address(unsigned long addr)
+struct module *__module_address(unsigned long addr)
 {
        struct module *mod;