Messages in this thread Patch in this message | | | From | Alan Jenkins <> | Subject | [PATCH 5/7] printk: fix printk(KERN_EMERG) followed by printk("emergency message\n") | Date | Wed, 7 Oct 2009 09:39:45 +0100 |
| |
Commit 5fd29d6 "printk: clean up handling of log-levels and newlines" causes printk(KERN_EMERG) to be ignored. Any "emergency message" which follows will be printed as KERN_DEFAULT.
This affects arch/x86/dumpstack.c, causing critical crash information to be logged as KERN_DEFAULT.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> --- kernel/printk.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c index 1714435..c7a1a85 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -763,14 +763,17 @@ asmlinkage int vprintk(const char *fmt, va_list args) } /* - * Copy the output into log_buf. If the caller didn't provide - * appropriate log level tags, we insert them here + * Now copy the output into log_buf. + * We add a log level tag at the start of each new line. */ + if (new_text_line) { + new_text_line = 0; + printk_token(current_log_level); + } + for ( ; *p; p++) { if (new_text_line) { new_text_line = 0; - - /* Always output the token */ printk_token(current_log_level); } -- 1.6.3.2
| |