aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 7fa134e0cc24..41f50605eed0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -856,7 +856,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
856 mutex_lock(&module_mutex); 856 mutex_lock(&module_mutex);
857 /* Store the name of the last unloaded module for diagnostic purposes */ 857 /* Store the name of the last unloaded module for diagnostic purposes */
858 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); 858 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
859 unregister_dynamic_debug_module(mod->name); 859 ddebug_remove_module(mod->name);
860 free_module(mod); 860 free_module(mod);
861 861
862 out: 862 out:
@@ -1861,19 +1861,13 @@ static inline void add_kallsyms(struct module *mod,
1861} 1861}
1862#endif /* CONFIG_KALLSYMS */ 1862#endif /* CONFIG_KALLSYMS */
1863 1863
1864static void dynamic_printk_setup(struct mod_debug *debug, unsigned int num) 1864static void dynamic_debug_setup(struct _ddebug *debug, unsigned int num)
1865{ 1865{
1866#ifdef CONFIG_DYNAMIC_PRINTK_DEBUG 1866#ifdef CONFIG_DYNAMIC_DEBUG
1867 unsigned int i; 1867 if (ddebug_add_module(debug, num, debug->modname))
1868 1868 printk(KERN_ERR "dynamic debug error adding module: %s\n",
1869 for (i = 0; i < num; i++) { 1869 debug->modname);
1870 register_dynamic_debug_module(debug[i].modname, 1870#endif
1871 debug[i].type,
1872 debug[i].logical_modname,
1873 debug[i].flag_names,
1874 debug[i].hash, debug[i].hash2);
1875 }
1876#endif /* CONFIG_DYNAMIC_PRINTK_DEBUG */
1877} 1871}
1878 1872
1879static void *module_alloc_update_bounds(unsigned long size) 1873static void *module_alloc_update_bounds(unsigned long size)
@@ -2247,12 +2241,13 @@ static noinline struct module *load_module(void __user *umod,
2247 add_kallsyms(mod, sechdrs, symindex, strindex, secstrings); 2241 add_kallsyms(mod, sechdrs, symindex, strindex, secstrings);
2248 2242
2249 if (!mod->taints) { 2243 if (!mod->taints) {
2250 struct mod_debug *debug; 2244 struct _ddebug *debug;
2251 unsigned int num_debug; 2245 unsigned int num_debug;
2252 2246
2253 debug = section_objs(hdr, sechdrs, secstrings, "__verbose", 2247 debug = section_objs(hdr, sechdrs, secstrings, "__verbose",
2254 sizeof(*debug), &num_debug); 2248 sizeof(*debug), &num_debug);
2255 dynamic_printk_setup(debug, num_debug); 2249 if (debug)
2250 dynamic_debug_setup(debug, num_debug);
2256 } 2251 }
2257 2252
2258 /* sechdrs[0].sh_size is always zero */ 2253 /* sechdrs[0].sh_size is always zero */