mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
module: initialize module dynamic debug later
We should initialize the module dynamic debug datastructures only after determining that the module is not loaded yet. This fixes a bug that introduced in 2.6.35-rc2, where when a trying to load a module twice, we also load it's dynamic printing data twice which causes all sorts of nasty issues. Also handle the dynamic debug cleanup later on failure. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed a #ifdef) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e3668dd83b
commit
ff49d74ad3
3 changed files with 18 additions and 11 deletions
|
@ -40,7 +40,7 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
|
|||
const char *modname);
|
||||
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG)
|
||||
extern int ddebug_remove_module(char *mod_name);
|
||||
extern int ddebug_remove_module(const char *mod_name);
|
||||
|
||||
#define __dynamic_dbg_enabled(dd) ({ \
|
||||
int __ret = 0; \
|
||||
|
@ -73,7 +73,7 @@ extern int ddebug_remove_module(char *mod_name);
|
|||
|
||||
#else
|
||||
|
||||
static inline int ddebug_remove_module(char *mod)
|
||||
static inline int ddebug_remove_module(const char *mod)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue