Move source tree closer to the 2.6.32.17 mainline
/kernel/module.c
blob:dfa33e8ee2a9c286ec4b4f4e1be9cb0e8c85667a -> blob:4b270e666212e29c083d6d012000794599438e73
--- kernel/module.c
+++ kernel/module.c
@@ -870,7 +870,6 @@ SYSCALL_DEFINE2(delete_module, const cha
mutex_lock(&module_mutex);
/* Store the name of the last unloaded module for diagnostic purposes */
strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
- ddebug_remove_module(mod->name);
free_module(mod);
out:
@@ -1533,6 +1532,9 @@ static void free_module(struct module *m
remove_sect_attrs(mod);
mod_kobject_remove(mod);
+ /* Remove dynamic debug info */
+ ddebug_remove_module(mod->name);
+
/* Arch-specific cleanup. */
module_arch_cleanup(mod);