Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262210AbVBQEpO (ORCPT ); Wed, 16 Feb 2005 23:45:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262211AbVBQEpO (ORCPT ); Wed, 16 Feb 2005 23:45:14 -0500 Received: from thunk.org ([69.25.196.29]:25244 "EHLO thunker.thunk.org") by vger.kernel.org with ESMTP id S262210AbVBQEpJ (ORCPT ); Wed, 16 Feb 2005 23:45:09 -0500 Date: Wed, 16 Feb 2005 23:44:44 -0500 From: "Theodore Ts'o" To: Linus Torvalds Cc: Roman Zippel , Andreas Schwab , linux-kernel@vger.kernel.org Subject: Re: Pty is losing bytes Message-ID: <20050217044444.GA6115@thunk.org> Mail-Followup-To: Theodore Ts'o , Linus Torvalds , Roman Zippel , Andreas Schwab , linux-kernel@vger.kernel.org References: <20050216144203.GB7767@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 22 On Wed, Feb 16, 2005 at 08:06:00AM -0800, Linus Torvalds wrote: > Yes, yes, but did you see my suggested version that I had just below that > explained what I thought the real fix was? > > Th eproblem with checking for the "canon but no canon data" is that it's a > special case that IS ONLY VALID WHEN THE BUFFER IS FULL! Until that > happens, it means that the code returns the wrong value, and then can > (obviously, as seen by the bug) drop bytes even when it shouldn't. > > That's why my suggested work-around moved things around, to only return > the "we'll take anything" thing if the buffer really was full. Yes, but then when the buffer is full, and we return the "we'll take anything" return value, the code that was getting confused with the "incorrect" receive_room value will still be getting confused.... - Ted - 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/