panic: add cpu/pid to warn_slowpath_common in WARNING printk()s
authorAlex Thorlton <[email protected]>
Mon, 8 Jul 2013 23:00:42 +0000 (16:00 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 Jul 2013 17:33:25 +0000 (10:33 -0700)
Add the cpu/pid that called WARN() so that the stack traces can be
matched up with the WARNING messages.

[[email protected]: remove stray quote]
Signed-off-by: Alex Thorlton <[email protected]>
Reviewed-by: Robin Holt <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Vikram Mulukutla <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/panic.c

index 167ec097ce8b3851d8f78c2ac7ef2614c840d517..97712319f1284152366e0cd5dda3cbae025bcbc7 100644 (file)
@@ -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);