LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] fix 'dynamic_debug' cmd line parameter
@ 2008-10-27 16:05 Jason Baron
  0 siblings, 0 replies; only message in thread
From: Jason Baron @ 2008-10-27 16:05 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

hi,

In testing 2.6.28-rc1, I found that passing 'dynamic_printk' on the command
line didn't activate the debug code. The problem is that dynamic_printk_setup()
(which activates the debugging) is being called before dynamic_printk_init() is
called (which initializes infrastructure). Fix this by setting setting the
state to 'DYNAMIC_ENABLED_ALL' in dynamic_printk_setup(), which will also
cause all subsequent modules to have debugging automatically started, which is
probably the behavior we want.

thanks,

-Jason

Signed-off-by: Jason Baron <jbaron@redhat.com>

diff --git a/lib/dynamic_printk.c b/lib/dynamic_printk.c
index d640f87..d83660f 100644
--- a/lib/dynamic_printk.c
+++ b/lib/dynamic_printk.c
@@ -402,6 +402,8 @@ static int __init dynamic_printk_init(void)
 				iter->logical_modname,
 				iter->flag_names, iter->hash, iter->hash2);
 	}
+	if (dynamic_enabled == DYNAMIC_ENABLED_ALL)
+		set_all(true);
 	return 0;
 }
 module_init(dynamic_printk_init);
@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(char *str)
 {
 	if (str)
 		return -ENOENT;
-	set_all(true);
+	dynamic_enabled = DYNAMIC_ENABLED_ALL;
 	return 0;
 }
 /* Use early_param(), so we can get debug output as early as possible */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-27 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-27 16:05 [PATCH] fix 'dynamic_debug' cmd line parameter Jason Baron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).