Re: [PATCH] printk: Fix discarding of records

From: Kay Sievers
Date: Sun Feb 16 2014 - 19:51:17 EST


On Mon, Feb 17, 2014 at 1:41 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, Feb 16, 2014 at 4:19 PM, Banerjee, Debabrata
> <dbanerje@xxxxxxxxxx> wrote:

> The third loop does *not* start again from the first line! It
> *continues* from where the second loop ended. Which is exactly why
> clearing "prev" is *wrong*. Because the *last* line that the second
> loop processes is indeed the previous line before the *first* line
> that the third loop starts processing.
>
> No, I haven't tested my patch, and maybe it's broken for some subtle
> reason I'm missing too.

That should avoid the overflow, yes. I expect it will not print the
first line with a prefix, which we probably should.?

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/