Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753490AbaBQAvD (ORCPT ); Sun, 16 Feb 2014 19:51:03 -0500 Received: from mail-we0-f172.google.com ([74.125.82.172]:44371 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752929AbaBQAvA (ORCPT ); Sun, 16 Feb 2014 19:51:00 -0500 MIME-Version: 1.0 In-Reply-To: References: <1392352954-29905-1-git-send-email-dbanerje@akamai.com> From: Kay Sievers Date: Mon, 17 Feb 2014 01:50:39 +0100 Message-ID: Subject: Re: [PATCH] printk: Fix discarding of records To: Linus Torvalds Cc: "Banerjee, Debabrata" , Greg Kroah-Hartman , Linux Kernel Mailing List , Jeff Mahoney , "dbavatar@gmail.com" , "Hunt, Joshua" , stable Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 17, 2014 at 1:41 AM, Linus Torvalds wrote: > On Sun, Feb 16, 2014 at 4:19 PM, Banerjee, Debabrata > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/