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 1196f5d11700..77672233387f 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -822,7 +822,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
822 mutex_lock(&module_mutex); 822 mutex_lock(&module_mutex);
823 /* Store the name of the last unloaded module for diagnostic purposes */ 823 /* Store the name of the last unloaded module for diagnostic purposes */
824 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); 824 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
825 unregister_dynamic_debug_module(mod->name); 825 ddebug_remove_module(mod->name);
826 free_module(mod); 826 free_module(mod);
827 827
828 out: 828 out:
@@ -1827,19 +1827,13 @@ static inline void add_kallsyms(struct module *mod,
1827} 1827}
1828#endif /* CONFIG_KALLSYMS */ 1828#endif /* CONFIG_KALLSYMS */
1829 1829
1830static void dynamic_printk_setup(struct mod_debug *debug, unsigned int num) 1830static void dynamic_debug_setup(struct _ddebug *debug, unsigned int num)
1831{ 1831{
1832#ifdef CONFIG_DYNAMIC_PRINTK_DEBUG 1832#ifdef CONFIG_DYNAMIC_DEBUG
1833 unsigned int i; 1833 if (ddebug_add_module(debug, num, debug->modname))
1834 1834 printk(KERN_ERR "dynamic debug error adding module: %s\n",
1835 for (i = 0; i < num; i++) { 1835 debug->modname);
1836 register_dynamic_debug_module(debug[i].modname, 1836#endif
1837 debug[i].type,
1838 debug[i].logical_modname,
1839 debug[i].flag_names,
1840 debug[i].hash, debug[i].hash2);
1841 }
1842#endif /* CONFIG_DYNAMIC_PRINTK_DEBUG */
1843} 1837}
1844 1838
1845static void *module_alloc_update_bounds(unsigned long size) 1839static void *module_alloc_update_bounds(unsigned long size)
@@ -2213,12 +2207,13 @@ static noinline struct module *load_module(void __user *umod,
2213 add_kallsyms(mod, sechdrs, symindex, strindex, secstrings); 2207 add_kallsyms(mod, sechdrs, symindex, strindex, secstrings);
2214 2208
2215 if (!mod->taints) { 2209 if (!mod->taints) {
2216 struct mod_debug *debug; 2210 struct _ddebug *debug;
2217 unsigned int num_debug; 2211 unsigned int num_debug;
2218 2212
2219 debug = section_objs(hdr, sechdrs, secstrings, "__verbose", 2213 debug = section_objs(hdr, sechdrs, secstrings, "__verbose",
2220 sizeof(*debug), &num_debug); 2214 sizeof(*debug), &num_debug);
2221 dynamic_printk_setup(debug, num_debug); 2215 if (debug)
2216 dynamic_debug_setup(debug, num_debug);
2222 } 2217 }
2223 2218
2224 /* sechdrs[0].sh_size is always zero */ 2219 /* sechdrs[0].sh_size is always zero */