1. 06 11月, 2014 1 次提交
    • P
      tty: Change tty lock order to master->slave · 2aff5e2b
      Peter Hurley 提交于
      When releasing the master pty, the slave pty also needs to be locked
      to prevent concurrent tty count changes for the slave pty and to
      ensure that only one parallel master and slave release observe the
      final close, and proceed to destruct the pty pair. Conversely, when
      releasing the slave pty, locking the master pty is not necessary
      (since the master's state can be inferred by the slave tty count).
      
      Introduce tty_lock_slave()/tty_unlock_slave() which acquires/releases
      the tty lock of the slave pty. Remove tty_lock_pair()/tty_unlock_pair().
      
      Dropping the tty_lock is no longer required to re-establish a stable
      lock order.
      Reviewed-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2aff5e2b
  2. 25 10月, 2012 1 次提交
  3. 11 8月, 2012 1 次提交
    • A
      tty: localise the lock · 89c8d91e
      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>
      89c8d91e
  4. 17 7月, 2012 1 次提交
  5. 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
  6. 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
  7. 01 6月, 2012 1 次提交
  8. 05 5月, 2012 1 次提交
  9. 24 8月, 2011 1 次提交
  10. 20 4月, 2011 1 次提交
  11. 05 11月, 2010 1 次提交
  12. 11 8月, 2010 1 次提交
    • A
      tty: implement BTM as mutex instead of BKL · b07471fa
      Arnd Bergmann 提交于
      The tty locking now follows the rules for mutexes, so
      we can replace the BKL usage with a new subsystem
      wide mutex.
      
      Using a regular mutex here will change the behaviour
      when blocked on the BTM from spinning to sleeping,
      but that should not be visible to the user.
      
      Using the mutex also means that all the BTM is now
      covered by lockdep.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b07471fa