1. 17 6月, 2009 1 次提交
    • A
      tty: fix sanity check · 1aa4bed8
      Alan Cox 提交于
      The WARN_ON() that was added to tty_reopen can be triggered in the specific
      case of a hangup occurring during a re-open of a tty which is not in the
      middle of being otherwise closed.
      
      In that case however the WARN() is bogus as we don't hold the neccessary
      locks to make a correct decision.
      
      The case we should be checking is "if the ldisc is not changing and reopen
      is occuring". We could drop the WARN_ON but for the moment the debug is more
      valuable even if it means taking a mutex as it will find any other cases.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1aa4bed8
  2. 11 6月, 2009 4 次提交
  3. 03 4月, 2009 2 次提交
  4. 01 4月, 2009 1 次提交
  5. 16 3月, 2009 1 次提交
    • J
      Use f_lock to protect f_flags · db1dd4d3
      Jonathan Corbet 提交于
      Traditionally, changes to struct file->f_flags have been done under BKL
      protection, or with no protection at all.  This patch causes all f_flags
      changes after file open/creation time to be done under protection of
      f_lock.  This allows the removal of some BKL usage and fixes a number of
      longstanding (if microscopic) races.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      db1dd4d3
  6. 27 1月, 2009 1 次提交
  7. 03 1月, 2009 3 次提交
    • A
      pty: simplify resize · fc6f6238
      Alan Cox 提交于
      We have special case logic for resizing pty/tty pairs. We also have a per
      driver resize method so for the pty case we should use it.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fc6f6238
    • J
      tty: Fix sparse static warning for tty_driver_lookup_tty · a47d545f
      Jason Wessel 提交于
      Fixed sparse warning:
      drivers/char/tty_io.c:1216:19: warning: symbol 'tty_driver_lookup_tty' was not declared. Should it be static?
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a47d545f
    • J
      n_tty: Fix loss of echoed characters and remove bkl from n_tty · a88a69c9
      Joe Peterson 提交于
      Fixes the loss of echoed (and other ldisc-generated characters) when
      the tty is stopped or when the driver output buffer is full (happens
      frequently for input during continuous program output, such as ^C)
      and removes the Big Kernel Lock from the N_TTY line discipline.
      
      Adds an "echo buffer" to the N_TTY line discipline that handles all
      ldisc-generated output (including echoed characters).  Along with the
      loss of characters, this also fixes the associated loss of sync between
      tty output and the ldisc state when characters cannot be immediately
      written to the tty driver.
      
      The echo buffer stores (in addition to characters) state operations that need
      to be done at the time of character output (like management of the column
      position).  This allows echo to cooperate correctly with program output,
      since the ldisc state remains consistent with actual characters written.
      
      Since the echo buffer code now isolates the tty column state code
      to the process_out* and process_echoes functions, we can remove the
      Big Kernel Lock (BKL) and replace it with mutex locks.
      
      Highlights are:
      
      * Handles echo (and other ldisc output) when tty driver buffer is full
        - continuous program output can block echo
      * Saves echo when tty is in stopped state (e.g. ^S)
        - (e.g.: ^Q will correctly cause held characters to be released for output)
      * Control character pairs (e.g. "^C") are treated atomically and not
        split up by interleaved program output
      * Line discipline state is kept consistent with characters sent to
        the tty driver
      * Remove the big kernel lock (BKL) from N_TTY line discipline
      Signed-off-by: NJoe Peterson <joe@skyrush.com>
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a88a69c9
  8. 09 12月, 2008 1 次提交
    • A
      Audit: Log TIOCSTI · 1e641743
      Al Viro 提交于
      AUDIT_TTY records currently log all data read by processes marked for
      TTY input auditing, even if the data was "pushed back" using the TIOCSTI
      ioctl, not typed by the user.
      
      This patch records all TIOCSTI calls to disambiguate the input.  It
      generates one audit message per character pushed back; considering
      TIOCSTI is used very rarely, this simple solution is probably good
      enough.  (The only program I could find that uses TIOCSTI is mailx/nail
      in "header editing" mode, e.g. using the ~h escape.  mailx is used very
      rarely, and the escapes are used even rarer.)
      Signed-Off-By: NMiloslav Trmac <mitr@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      1e641743
  9. 02 12月, 2008 1 次提交
  10. 17 10月, 2008 1 次提交
  11. 16 10月, 2008 1 次提交
  12. 14 10月, 2008 23 次提交