x86,kmemcheck: Use KERN_WARNING for error reporting
PATCH 1/1 x86,kmemcheck: Use KERN_WARNING for error reporting
From: Pekka Enberg <[email protected]>
As suggested by Vegard Nossum, use KERN_WARNING for error reporting to make sure kmemcheck reports end up in syslog.
---
Vegard, how do you want to merge this? Andrew? Ingo? I can also pick it up in my tree if you ACK it.
arch/x86/mm/kmemcheck/error.c | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-)
arch/x86/mm/kmemcheck/error.c +9 -10
@@ -106,26 +106,25 @@ void kmemcheck_error_recall(void)switch (e->type) {case KMEMCHECK_ERROR_INVALID_ACCESS : -printk (KERN_ERR "WARNING: kmemcheck: Caught %d-bit read " -"from %s memory (%p)\n" , +printk (KERN_WARNING "WARNING: kmemcheck: Caught %d-bit read from %s memory (%p)\n" ,8 * e->size, e->state <ARRAY_SIZE (desc) ? desc[e->state] :"(invalid shadow state)" , (void *) e->address); -printk (KERN_INFO ); +printk (KERN_WARNING );for (i =0 ; i <SHADOW_COPY_SIZE ; ++i) -printk ("%02x" , e->memory_copy[i]); -printk ("\n" ); +printk (KERN_CONT "%02x" , e->memory_copy[i]); +printk (KERN_CONT "\n" ); -printk (KERN_INFO ); +printk (KERN_WARNING );for (i =0 ; i <SHADOW_COPY_SIZE ; ++i) {if (e->shadow_copy[i] <ARRAY_SIZE (short_desc)) -printk (" %c" , short_desc[e->shadow_copy[i]]); +printk (KERN_CONT " %c" , short_desc[e->shadow_copy[i]]);else -printk (" ?" ); +printk (KERN_CONT " ?" ); } -printk ("\n" ); -printk (KERN_INFO "%*c\n" ,2 +2 +printk (KERN_CONT "\n" ); +printk (KERN_WARNING "%*c\n" ,2 +2 * (int ) (e->address & (SHADOW_COPY_SIZE -1 )),'^' );break ;case KMEMCHECK_ERROR_BUG :
Signature · 1 line
1.6.0.4
Quoted 11 lines · Pekka Enberg
From: Pekka Enberg <[email protected]>
As suggested by Vegard Nossum, use
KERN_WARNINGfor error reporting to make sure kmemcheck reports end up in syslog.Cc Vegard Nossum <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Pekka Enberg <[email protected]>---
Vegard, how do you want to merge this? Andrew? Ingo? I can also pick it up in my tree if you ACK it.
Can apply it to x86/urgent, next to your other printk-loglevel-fixing patch.
Ingo
Quoted 7 lines · Ingo Molnar
Quoted 5 lines · Pekka Enberg
From: Pekka Enberg <[email protected]>
As suggested by Vegard Nossum, use
KERN_WARNINGfor error reporting to make sure kmemcheck reports end up in syslog.
Quoted 8 lines
Quoted 6 lines
Cc Vegard Nossum <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Pekka Enberg <[email protected]>---
Vegard, how do you want to merge this? Andrew? Ingo? I can also pick it up in my tree if you ACK it.Can apply it to x86/urgent, next to your other printk-loglevel-fixing patch.
OK, thanks Ingo!
[tip:x86/urgent] x86, kmemcheck: Use KERN_WARNING for error reporting
In reply to Pekka EnbergCommit-ID: c0ca9da442df82b67095f230f24762042f9f3b7d Gitweb: http://git.kernel.org/tip/c0ca9da442df82b67095f230f24762042f9f3b7d Author: Pekka Enberg <[email protected]> AuthorDate: Mon, 28 Dec 2009 11:02:15 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 28 Dec 2009 10:28:35 +0100
x86, kmemcheck: Use KERN_WARNING for error reporting
As suggested by Vegard Nossum, use KERN_WARNING for error reporting to make sure kmemcheck reports end up in syslog.
LKML-Reference: <1261990935.4641.7.camel@penberg-laptop>
--- arch/x86/mm/kmemcheck/error.c | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-)
arch/x86/mm/kmemcheck/error.c +9 -10
@@ -106,26 +106,25 @@ void kmemcheck_error_recall(void)switch (e->type) {case KMEMCHECK_ERROR_INVALID_ACCESS : -printk (KERN_ERR "WARNING: kmemcheck: Caught %d-bit read " -"from %s memory (%p)\n" , +printk (KERN_WARNING "WARNING: kmemcheck: Caught %d-bit read from %s memory (%p)\n" ,8 * e->size, e->state <ARRAY_SIZE (desc) ? desc[e->state] :"(invalid shadow state)" , (void *) e->address); -printk (KERN_INFO ); +printk (KERN_WARNING );for (i =0 ; i <SHADOW_COPY_SIZE ; ++i) -printk ("%02x" , e->memory_copy[i]); -printk ("\n" ); +printk (KERN_CONT "%02x" , e->memory_copy[i]); +printk (KERN_CONT "\n" ); -printk (KERN_INFO ); +printk (KERN_WARNING );for (i =0 ; i <SHADOW_COPY_SIZE ; ++i) {if (e->shadow_copy[i] <ARRAY_SIZE (short_desc)) -printk (" %c" , short_desc[e->shadow_copy[i]]); +printk (KERN_CONT " %c" , short_desc[e->shadow_copy[i]]);else -printk (" ?" ); +printk (KERN_CONT " ?" ); } -printk ("\n" ); -printk (KERN_INFO "%*c\n" ,2 +2 +printk (KERN_CONT "\n" ); +printk (KERN_WARNING "%*c\n" ,2 +2 * (int ) (e->address & (SHADOW_COPY_SIZE -1 )),'^' );break ;case KMEMCHECK_ERROR_BUG :