public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Remove spurious printk level from segfault message
@ 2009-07-11  7:10 Roland Dreier
  2009-07-11  7:57 ` Ingo Molnar
  2009-07-11  8:01 ` [tip:x86/urgent] " tip-bot for Roland Dreier
  0 siblings, 2 replies; 3+ messages in thread
From: Roland Dreier @ 2009-07-11  7:10 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel

Since commit 5fd29d6c ("printk: clean up handling of log-levels and
newlines"), the kernel logs segfaults like:

    <6>gnome-power-man[24509]: segfault at 20 ip 00007f9d4950465a sp 00007fffbb50fc70 error 4 in libgobject-2.0.so.0.2103.0[7f9d494f7000+45000]

with the extra "<6>" being KERN_INFO.  This happens because the printk
in show_signal_msg() started with KERN_CONT and then used "%s" to pass
in the real level; and KERN_CONT is no longer an empty string, and
printk only pays attention to the level at the very beginning of the
format string.

Therefore, remove the KERN_CONT from this printk, since it is now
actively causing problems (and never really made any sense).

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
---
 arch/x86/mm/fault.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 85307cc..bfae139 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -697,7 +697,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
 	if (!printk_ratelimit())
 		return;
 
-	printk(KERN_CONT "%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
+	printk("%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
 		task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
 		tsk->comm, task_pid_nr(tsk), address,
 		(void *)regs->ip, (void *)regs->sp, error_code);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Remove spurious printk level from segfault message
  2009-07-11  7:10 [PATCH] x86: Remove spurious printk level from segfault message Roland Dreier
@ 2009-07-11  7:57 ` Ingo Molnar
  2009-07-11  8:01 ` [tip:x86/urgent] " tip-bot for Roland Dreier
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-07-11  7:57 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Linus Torvalds, linux-kernel


* Roland Dreier <roland@digitalvampire.org> wrote:

> Since commit 5fd29d6c ("printk: clean up handling of log-levels and
> newlines"), the kernel logs segfaults like:
> 
>     <6>gnome-power-man[24509]: segfault at 20 ip 00007f9d4950465a sp 00007fffbb50fc70 error 4 in libgobject-2.0.so.0.2103.0[7f9d494f7000+45000]
> 
> with the extra "<6>" being KERN_INFO.  This happens because the printk
> in show_signal_msg() started with KERN_CONT and then used "%s" to pass
> in the real level; and KERN_CONT is no longer an empty string, and
> printk only pays attention to the level at the very beginning of the
> format string.
> 
> Therefore, remove the KERN_CONT from this printk, since it is now
> actively causing problems (and never really made any sense).

Indeed, this particular KERN_CONT never made any sense. It's good it 
has some active role now. Applied to tip:x86/urgent, thanks Roland.

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86: Remove spurious printk level from segfault message
  2009-07-11  7:10 [PATCH] x86: Remove spurious printk level from segfault message Roland Dreier
  2009-07-11  7:57 ` Ingo Molnar
@ 2009-07-11  8:01 ` tip-bot for Roland Dreier
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Roland Dreier @ 2009-07-11  8:01 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, roland, torvalds, tglx, mingo

Commit-ID:  a1a08d1cb0ab148fd74216e4c0b4d4db18fe62c6
Gitweb:     http://git.kernel.org/tip/a1a08d1cb0ab148fd74216e4c0b4d4db18fe62c6
Author:     Roland Dreier <roland@digitalvampire.org>
AuthorDate: Sat, 11 Jul 2009 00:10:04 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 11 Jul 2009 09:56:19 +0200

x86: Remove spurious printk level from segfault message

Since commit 5fd29d6c ("printk: clean up handling of log-levels
and newlines"), the kernel logs segfaults like:

    <6>gnome-power-man[24509]: segfault at 20 ip 00007f9d4950465a sp 00007fffbb50fc70 error 4 in libgobject-2.0.so.0.2103.0[7f9d494f7000+45000]

with the extra "<6>" being KERN_INFO.  This happens because the
printk in show_signal_msg() started with KERN_CONT and then
used "%s" to pass in the real level; and KERN_CONT is no longer
an empty string, and printk only pays attention to the level at
the very beginning of the format string.

Therefore, remove the KERN_CONT from this printk, since it is
now actively causing problems (and never really made any
sense).

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <874otjitkj.fsf@shaolin.home.digitalvampire.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/mm/fault.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 85307cc..bfae139 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -697,7 +697,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
 	if (!printk_ratelimit())
 		return;
 
-	printk(KERN_CONT "%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
+	printk("%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
 		task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
 		tsk->comm, task_pid_nr(tsk), address,
 		(void *)regs->ip, (void *)regs->sp, error_code);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-11  8:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-11  7:10 [PATCH] x86: Remove spurious printk level from segfault message Roland Dreier
2009-07-11  7:57 ` Ingo Molnar
2009-07-11  8:01 ` [tip:x86/urgent] " tip-bot for Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox