linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2] panic: add cpu/pid to warn_slowpath_common in WARNING printk()s
@ 2013-05-08 21:01 athorlton
  0 siblings, 0 replies; only message in thread
From: athorlton @ 2013-05-08 21:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alex Thorlton, Andrew Morton, Stephen Boyd, Vikram Mulukutla,
	Rusty Russell, Tejun Heo, Robin Holt, Vineet Gupta,
	David S. Miller, Richard Kuo, Jesper Nilsson

These patches fix up issues with interspersed output from multiple
simultaneous calls to warn or dump_stack on multi-cpu systems.
References: <20130508210102.898396979@asylum.americas.sgi.com>
Content-Disposition: inline; filename=add-cpu-pid-warn.patch

This patch adds in the cpu/pid that called WARN() so that the stack
traces can be matched up with the WARNING messages.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Vikram Mulukutla <markivx@codeaurora.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Reviewed-by: Robin Holt <holt@sgi.com>
Signed-off-by: Alex Thorlton <athorlton@sgi.com>
---
 kernel/panic.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- linux.orig/kernel/panic.c
+++ linux/kernel/panic.c
@@ -399,8 +399,9 @@ struct slowpath_args {
 static void warn_slowpath_common(const char *file, int line, void *caller,
 				 unsigned taint, struct slowpath_args *args)
 {
-	printk(KERN_WARNING "------------[ cut here ]------------\n");
-	printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller);
+	pr_warn("------------[ cut here ]------------\n");
+	pr_warn("WARNING: CPU: %d PID: %d at %s:%d %pS()\n",  '
+		raw_smp_processor_id(), current->pid, file, line, caller);
 
 	if (args)
 		vprintk(args->fmt, args->args);


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

only message in thread, other threads:[~2013-05-08 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 21:01 [patch 2/2] panic: add cpu/pid to warn_slowpath_common in WARNING printk()s athorlton

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).