Re: Pty is losing bytes

From: Theodore Ts'o (tytso_at_mit.edu)
Date: 02/17/05

  • Next message: Dmitry Torokhov: "Swsusp, resume and kernel versions"
    Date:	Wed, 16 Feb 2005 23:44:44 -0500
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    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/


  • Next message: Dmitry Torokhov: "Swsusp, resume and kernel versions"

    Relevant Pages

    • Re: e1000 driver 2.6.18 - how to waste processor cycles
      ... if (skb already exists in ring buffer) ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: tickle nmi watchdog whilst doing serial writes.
      ... Dave Jones writes: ... The real fix of course is to use schedule_timeout, ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: [PATCH] report size of printk buffer
      ... The buffer is 131072 bytes. ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: 2.6.13-rc6-mm1
      ... >> the next call the buffer will be filled only by spaces which is ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: Repost: Bug with select?
      ... are in the write buffer right now. ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)