This is a note to let you know that I've just added the patch titled
drivers-core: make structured logging play nice with dynamic-debug
to the 3.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drivers-core-make-structured-logging-play-nice-with-dynamic-debug.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From af7f2158fdee9d7f55b793b09f8170a3391f889a Mon Sep 17 00:00:00 2001
From: Jim Cromie <[email protected]>
Date: Thu, 19 Jul 2012 13:46:21 -0600
Subject: drivers-core: make structured logging play nice with dynamic-debug
From: Jim Cromie <[email protected]>
commit af7f2158fdee9d7f55b793b09f8170a3391f889a upstream.
commit c4e00daaa96d3a0786f1f4fe6456281c60ef9a16 changed __dev_printk
in a way that broke dynamic-debug's ability to control the dynamic
prefix of dev_dbg(dev,..), but not dev_dbg(NULL,..) or pr_debug(..),
which is why it wasnt noticed sooner.
When dev==NULL, __dev_printk() just calls printk(), which just works.
But otherwise, it assumed that level was always a string like "<L>"
and just plucked out the 'L', ignoring the rest. However,
dynamic_emit_prefix() adds "[tid] module:func:line:" to the string,
those additions all got lost.
Signed-off-by: Jim Cromie <[email protected]>
Acked-by: Jason Baron <[email protected]>
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/base/core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1848,6 +1848,7 @@ int __dev_printk(const char *level, cons
struct va_format *vaf)
{
char dict[128];
+ const char *level_extra = "";
size_t dictlen = 0;
const char *subsys;
@@ -1894,10 +1895,14 @@ int __dev_printk(const char *level, cons
"DEVICE=+%s:%s", subsys, dev_name(dev));
}
skip:
+ if (level[3])
+ level_extra = &level[3]; /* skip past "<L>" */
+
return printk_emit(0, level[1] - '0',
dictlen ? dict : NULL, dictlen,
- "%s %s: %pV",
- dev_driver_string(dev), dev_name(dev), vaf);
+ "%s %s: %s%pV",
+ dev_driver_string(dev), dev_name(dev),
+ level_extra, vaf);
}
EXPORT_SYMBOL(__dev_printk);
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/drivers-core-make-structured-logging-play-nice-with-dynamic-debug.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html