Merge remote-tracking branch 'remotes/kernel-2.6.32/develop' into develop-2.6.36
[firefly-linux-kernel-4.4.55.git] / kernel / module.c
index d0b5f8db11b4a4183c229e2a44f433a99f58090a..323721ca9b1eef37726e05abbf4efe58152f8064 100644 (file)
@@ -1537,6 +1537,7 @@ static int __unlink_module(void *_mod)
 {
        struct module *mod = _mod;
        list_del(&mod->list);
+       module_bug_cleanup(mod);
        return 0;
 }
 
@@ -2625,6 +2626,7 @@ static struct module *load_module(void __user *umod,
        if (err < 0)
                goto ddebug;
 
+       module_bug_finalize(info.hdr, info.sechdrs, mod);
        list_add_rcu(&mod->list, &modules);
        mutex_unlock(&module_mutex);
 
@@ -2650,6 +2652,8 @@ static struct module *load_module(void __user *umod,
        mutex_lock(&module_mutex);
        /* Unlink carefully: kallsyms could be walking list. */
        list_del_rcu(&mod->list);
+       module_bug_cleanup(mod);
+
  ddebug:
        if (!mod->taints)
                dynamic_debug_remove(info.debug);
@@ -3183,6 +3187,7 @@ EXPORT_SYMBOL_GPL(__module_text_address);
 /* Don't grab lock, we're oopsing. */
 void print_modules(void)
 {
+#ifndef CONFIG_ARCH_RK29
        struct module *mod;
        char buf[8];
 
@@ -3195,6 +3200,7 @@ void print_modules(void)
        if (last_unloaded_module[0])
                printk(" [last unloaded: %s]", last_unloaded_module);
        printk("\n");
+#endif
 }
 
 #ifdef CONFIG_MODVERSIONS