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(); }