From: Rusty Russell <rusty@rustcorp.com.au>
To: Yehuda Sadeh <yehuda@hq.newdream.net>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
yehudasa@gmail.com, sage@newdream.net
Subject: Re: [PATCH 1/1] module: initialize module dynamic debug later
Date: Wed, 16 Jun 2010 12:07:13 +0930 [thread overview]
Message-ID: <201006161207.14257.rusty@rustcorp.com.au> (raw)
In-Reply-To: <b419ab1fe660cb24a32e63f9c2da2301b3ff1278.1276647544.git.yehuda@hq.newdream.net>
On Wed, 16 Jun 2010 09:56:37 am Yehuda Sadeh wrote:
> 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>
Hi Yehuda,
Thanks for tracking this down. One minor comment:
> #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;
> }
This implies we don't need the #ifdef here:
> +static void dynamic_debug_remove(struct _ddebug *debug)
> +{
> +#ifdef CONFIG_DYNAMIC_DEBUG
> + if (debug)
> + ddebug_remove_module(debug->modname);
> +#endif
> +}
> +
So I removed it. It'd be nice to have a similar wrapper in the header
for ddebug_add_module so we can avoid the #ifdef there too, but that's
a separate patch.
Applied!
Rusty.
next prev parent reply other threads:[~2010-06-16 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 0:26 [PATCH 1/1] module: initialize module dynamic debug later Yehuda Sadeh
2010-06-16 2:37 ` Rusty Russell [this message]
2010-06-16 4:03 ` [PATCH] " Rusty Russell
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=201006161207.14257.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=sage@newdream.net \
--cc=torvalds@linux-foundation.org \
--cc=yehuda@hq.newdream.net \
--cc=yehudasa@gmail.com \
/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