1. 11 6月, 2009 4 次提交
    • A
      tty: rewrite the ldisc locking · c65c9bc3
      Alan Cox 提交于
      There are several pretty much unfixable races in the old ldisc code, especially
      with respect to pty behaviour and also to hangup. It's easier to rewrite the
      code than simply try and patch it up.
      
      This patch
      - splits the ldisc from the tty (so we will be able to refcount it more cleanly
        later)
      - introduces a mutex lock for ldisc changing on an active device
      - fixes the complete mess that hangup caused
      - implements hopefully correct setldisc/close/hangup locking
      
      There are still some problems around pty pairs that have always been there but
      at least it is now possible to understand the code and fix further problems.
      
      This fixes the following known bugs
      - hang up can leak ldisc references
      - hang up may not call open/close on ldisc in a matched way
      - pty/tty pairs can deadlock during an ldisc change
      - reading the ldisc proc files can cause every ldisc to be loaded
      
      and probably a few other of the mysterious ldisc race reports.
      
      I'm sure it also adds the odd new one.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c65c9bc3
    • A
      tty: Extract various bits of ldisc code · e8b70e7d
      Alan Cox 提交于
      Before trying to tackle the ldisc bugs the code needs to be a good deal
      more readable, so do the simple extractions of routines first.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8b70e7d
    • A
      tty: Implement a drain delay in the tty port · 1ec739be
      Alan Cox 提交于
      We need this for devices that cannot flush and wait, but which do not order
      data and modem events. Without it we will hang up before all the data
      clears the hardware. Needed for the USB changes.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1ec739be
    • A
      tty: Add carrier processing on close to the tty_port core · fcc8ac18
      Alan Cox 提交于
      Some drivers implement this internally, others miss it out. Push the
      behaviour into the core code as that way everyone will do it consistently.
      
      Update the dtr rts method to raise or lower depending upon flags. Having a
      single method in this style fits most of the implementations more cleanly than
      two funtions.
      
      We need this in place before we tackle the USB side
      Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fcc8ac18
  2. 03 1月, 2009 8 次提交
  3. 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
  4. 25 11月, 2008 1 次提交
  5. 14 10月, 2008 11 次提交
  6. 16 8月, 2008 1 次提交
  7. 23 7月, 2008 1 次提交
  8. 21 7月, 2008 4 次提交
  9. 07 6月, 2008 1 次提交
  10. 30 4月, 2008 5 次提交
  11. 28 4月, 2008 2 次提交
  12. 08 2月, 2008 1 次提交