1. 07 9月, 2012 2 次提交
  2. 06 9月, 2012 1 次提交
  3. 17 8月, 2012 1 次提交
  4. 14 8月, 2012 3 次提交
  5. 11 8月, 2012 4 次提交
  6. 28 7月, 2012 1 次提交
    • A
      tty: Fix race in tty release · d155255a
      Alan Cox 提交于
      Ian Abbott found that the tty layer would explode with the right set of
      parallel open and close operations. This is because we race in the
      handling of tty->drivers->termios[].
      
      Correct this by
      	Making tty_ldisc_release behave like nromal code (takes the lock,
      			does stuff, drops the lock)
      	Drop the tty lock earlier in tty_ldisc_release
      	Taking the tty mutex around the driver->termios update in all cases
      	Adding a WARN_ON to catch future screwups.
      
      I also forgot to clean up the pty resources properly. With a pty pair we
      need to pull both halves out of the tables.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Tested-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d155255a
  7. 18 7月, 2012 1 次提交
  8. 17 7月, 2012 2 次提交
  9. 07 7月, 2012 1 次提交
    • A
      tty: localise the lock · f5e3bcc5
      Alan Cox 提交于
      The termios and other changes mean the other protections needed on the driver
      tty arrays should be adequate. Turn it all back on.
      
      This contains pieces folded in from the fixes made to the original patches
      
      | From: Geert Uytterhoeven <geert@linux-m68k.org>	(fix m68k)
      | From: Paul Gortmaker <paul.gortmaker@windriver.com>	(fix cris)
      | From: Jiri Kosina <jkosina@suze.cz>			(lockdep)
      | From: Eric Dumazet <eric.dumazet@gmail.com>		(lockdep)
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f5e3bcc5
  10. 14 6月, 2012 2 次提交
  11. 03 6月, 2012 1 次提交
    • L
      tty: Revert the tty locking series, it needs more work · f309532b
      Linus Torvalds 提交于
      This reverts the tty layer change to use per-tty locking, because it's
      not correct yet, and fixing it will require some more deep surgery.
      
      The main revert is d29f3ef3 ("tty_lock: Localise the lock"), but
      there are several smaller commits that built upon it, they also get
      reverted here. The list of reverted commits is:
      
        fde86d31 - tty: add lockdep annotations
        8f6576ad - tty: fix ldisc lock inversion trace
        d3ca8b64 - pty: Fix lock inversion
        b1d679af - tty: drop the pty lock during hangup
        abcefe5f - tty/amiserial: Add missing argument for tty_unlock()
        fd11b42e - cris: fix missing tty arg in wait_event_interruptible_tty call
        d29f3ef3 - tty_lock: Localise the lock
      
      The revert had a trivial conflict in the 68360serial.c staging driver
      that got removed in the meantime.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f309532b
  12. 05 5月, 2012 2 次提交
  13. 29 3月, 2012 1 次提交
  14. 09 3月, 2012 4 次提交
  15. 25 2月, 2012 1 次提交
  16. 03 2月, 2012 2 次提交
  17. 25 1月, 2012 1 次提交
    • K
      tty: cleanup prohibition of direct opening for unix98 pty master · 593a27c4
      Konstantin Khlebnikov 提交于
      cleanup hack added in v2.6.27-3203-g15582d36
      
      comment from that patch:
      
      : pty: If the administrator creates a device for a ptmx slave we should not error
      :
      : The open path for ptmx slaves is via the ptmx device. Opening them any
      : other way is not allowed. Vegard Nossum found that previously this was not
      : the case and mknod foo c 128 42; cat foo would produce nasty diagnostics
      :
      : Signed-off-by: Alan Cox <alan@redhat.com>
      : Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
      
      devpts_get_tty() returns non-null only for inodes on devpts, but there is no
      inodes for master-devices, /dev/ptmx (/dev/pts/ptmx) is the only way to open them.
      Thus we can completely forbid lookup for master-devices and eliminate that hack in
      tty_init_dev() because tty_open() will get EIO from tty_driver_lookup_tty().
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      593a27c4
  18. 04 1月, 2012 1 次提交
  19. 16 11月, 2011 7 次提交
  20. 19 10月, 2011 2 次提交
    • G
      Revert "TTY: call tty_driver_lookup_tty unconditionally" · a0340703
      Greg Kroah-Hartman 提交于
      This reverts commit 631180ac.
      
      It caused problems when /dev/tty is a pty:
      	https://lkml.org/lkml/2011/10/12/401
      
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
      Cc: Alan Cox <alan@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a0340703
    • J
      TTY: call tty_driver_lookup_tty unconditionally · 631180ac
      Jiri Slaby 提交于
      Commit 4a2b5fdd (Move tty lookup/reopen to caller) made the call to
      tty_driver_lookup_tty conditional in tty_open. It doesn't look like it
      was an intention. Or if it was, it was not documented in the changelog
      and the code now looks weird. For example there would be no need to
      remember the tty driver and tty index. Further the condition depends
      on a tty which we drop a reference of already.
      
      If I'm looking correctly, this should not matter thanks to the locking
      currently done there. Thus, tty_driver->ttys[idx] cannot change under
      our hands. But anyway, it makes sense to change that to the old
      behaviour.
      
      Introduced-in: v2.6.28-rc2
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
      Cc: Alan Cox <alan@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      631180ac