mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Jason Baron <jbaron@redhat.com>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 6/6] Driver core: fix 'dynamic_debug' cmd line parameter
Date: Wed, 29 Oct 2008 15:58:12 -0700	[thread overview]
Message-ID: <1225321092-21933-6-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20081029223824.GB21657@kroah.com>

From: Jason Baron <jbaron@redhat.com>

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.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 lib/dynamic_printk.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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 */
-- 
1.6.0.2


      parent reply	other threads:[~2008-10-29 23:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 22:38 [GIT PATCH] driver core fixes for your 2.6-git tree Greg KH
2008-10-29 22:58 ` [PATCH 1/6] Document kernel taint flags properly Greg Kroah-Hartman
2008-10-29 22:58 ` [PATCH 2/6] driver core: drivers/base/sys.c: update comments Greg Kroah-Hartman
2008-10-29 22:58 ` [PATCH 3/6] sysfs: Fix return values for sysdev_store_{ulong,int} Greg Kroah-Hartman
2008-10-29 22:58 ` [PATCH 4/6] Update stable tree documentation Greg Kroah-Hartman
2008-10-29 22:58 ` [PATCH 5/6] HOWTO: Sync patch for jp_JP/HOWTO Greg Kroah-Hartman
2008-10-29 22:58 ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1225321092-21933-6-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®