From 012c7953367791ef0962f0748c889c10e195ead0 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 29 Jun 2012 11:40:11 -0400 Subject: [PATCH] --- yaml --- r: 311510 b: refs/heads/master c: d36208227d03c44c0a74cd702cc94528162e1703 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/printk.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index c5b3c10cee5a..df0786caaf62 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 084681d14e429cb6192262ac7437f00e2c02f26a +refs/heads/master: d36208227d03c44c0a74cd702cc94528162e1703 diff --git a/trunk/kernel/printk.c b/trunk/kernel/printk.c index fbf4d0b22a1d..5ae6b09e3805 100644 --- a/trunk/kernel/printk.c +++ b/trunk/kernel/printk.c @@ -1496,15 +1496,14 @@ asmlinkage int vprintk_emit(int facility, int level, bool stored = false; /* - * Flush the conflicting buffer. An earlier newline was missing, - * or we race with a continuation line from an interrupt. + * If an earlier newline was missing and it was the same task, + * either merge it with the current buffer and flush, or if + * there was a race with interrupts (prefix == true) then just + * flush it out and store this line separately. */ - if (cont.len && prefix && cont.owner == current) - cont_flush(); - - /* Merge with our buffer if possible; flush it in any case */ if (cont.len && cont.owner == current) { - stored = cont_add(facility, level, text, text_len); + if (!prefix) + stored = cont_add(facility, level, text, text_len); cont_flush(); }