lkml.org 
[lkml]   [2014]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] printk: Fix discarding of records
On 2/16/14, 2:28 PM, "Linus Torvalds" <torvalds@linux-foundation.org>
wrote:

>Why are *those* particular two "prev = msg->flags" incorrect, when
>every other case where we walk the messages they are required?
>
>The code/logic makes no sense. You remove the "prev = msg->flags" at
>line 1070, when the *identical* loop just above it has it. So now the
>two loops count the number of characters differently. That makes no
>sense.
>
>So I don't think this fixes the fundamental problem. I'm more inclined
>to believe that LOG_CONT is wrongly set somewhere, for example because
>a continuation wasn't actually originally printed due to coming from
>different users or something like that.
>
>Or at the very least I want a coherent explanation why one loop would
>do this and the other would not, and why counting up *different*
>numbers could possibly make sense.

The explanation is: the loops look identical but they are not. When a
record is printed first, its size can expand due to adding the prefix and
timestamp. The second loop is calculating len with the first line printed
possibly changing every iteration.


>
>Because as it is, there clearly is some problem, but the patch does
>not look sensible to me.

You are right, the patch is still flawed, sending V2.


-Debabrata



\
 
 \ /
  Last update: 2014-02-17 01:21    [W:0.082 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site