Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe-x86
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomai
  • ipipe-x86
  • Repository

Switch branch/tag
  • ipipe-x86
  • drivers
  • char
  • pty.c
Find file BlameHistoryPermalink
  • Linus Torvalds's avatar
    pty: don't limit the writes to 'pty_space()' inside 'pty_write()' · ac89a917
    Linus Torvalds authored Sep 05, 2009
    The whole write-room thing is something that is up to the _caller_ to
    worry about, not the pty layer itself.  The total buffer space will
    still be limited by the buffering routines themselves, so there is no
    advantage or need in having pty_write() artificially limit the size
    somehow.
    
    And what happened was that the caller (the n_tty line discipline, in
    this case) may have verified that there is room for 2 bytes to be
    written (for NL -> CRNL expansion), and it used to then do those writes
    as two single-byte writes.  And if the first byte written (CR) then
    caused a new tty buffer to be allocated, pty_space() may have returned
    zero when trying to write the second byte (LF), and then incorrectly
    failed the write - leading to a lost newline character.
    
    This should finally fix
    
    	http://bugzilla.kernel.org/show_bug.cgi?id=14015
    
    Reported-by: default avatarMikael Pettersson <mikpe@it.uu.se>
    Acked-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    ac89a917

Replace pty.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.

Imprint & Privacy Policy