1. 19 1月, 2017 1 次提交
  2. 02 5月, 2016 1 次提交
  3. 01 5月, 2016 8 次提交
  4. 28 4月, 2016 1 次提交
    • A
      tty: provide tty_name() even without CONFIG_TTY · 188e3c5c
      Arnd Bergmann 提交于
      The audit subsystem just started printing the name of the tty,
      but that causes a build failure when CONFIG_TTY is disabled:
      
      kernel/built-in.o: In function `audit_log_task_info':
      memremap.c:(.text+0x5e34c): undefined reference to `tty_name'
      kernel/built-in.o: In function `audit_set_loginuid':
      memremap.c:(.text+0x63b34): undefined reference to `tty_name'
      
      This adds tty_name() to the list of functions that are provided
      as trivial stubs in that configuration.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: db0a6fb5 ("audit: add tty field to LOGIN event")
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      188e3c5c
  5. 29 1月, 2016 2 次提交
  6. 28 1月, 2016 14 次提交
  7. 27 1月, 2016 1 次提交
  8. 14 12月, 2015 6 次提交
  9. 21 11月, 2015 1 次提交
  10. 18 10月, 2015 5 次提交
    • P
      tty: Abstract tty buffer work · e176058f
      Peter Hurley 提交于
      Introduce API functions to restart and cancel tty buffer work, rather
      than manipulate buffer work directly.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e176058f
    • P
      tty: Combine SIGTTOU/SIGTTIN handling · 2812d9e9
      Peter Hurley 提交于
      The job_control() check in n_tty_read() has nearly identical purpose
      and results as tty_check_change(). Both functions' purpose is to
      determine if the current task's pgrp is the foreground pgrp for the tty,
      and if not, to signal the current pgrp.
      
      Introduce __tty_check_change() which takes the signal to send
      and performs the shared operations for job control() and
      tty_check_change().
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2812d9e9
    • P
      tty: Remove wait_event_interruptible_tty() · f148d6d7
      Peter Hurley 提交于
      In-tree users of wait_event_interruptible_tty() have been removed;
      remove.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f148d6d7
    • P
      tty: Remove tty_port::close_wait · cc2aaabf
      Peter Hurley 提交于
      With the removal of tty_wait_until_sent_from_close(), tty drivers
      no longer wait during open for parallel closes to complete (instead,
      the tty core waits before calling the driver open() method). Thus,
      the close_wait waitqueue is no longer used for waiting.
      
      Remove struct tty_port::close_wait.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc2aaabf
    • P
      tty: Remove tty_wait_until_sent_from_close() · 79c1faa4
      Peter Hurley 提交于
      tty_wait_until_sent_from_close() drops the tty lock while waiting
      for the tty driver to finish sending previously accepted data (ie.,
      data remaining in its write buffer and transmit fifo).
      
      tty_wait_until_sent_from_close() was added by commit a57a7bf3
      ("TTY: define tty_wait_until_sent_from_close") to prevent the entire
      tty subsystem from being unable to open new ttys while waiting for
      one tty to close while output drained.
      
      However, since commit 0911261d ("tty: Don't take tty_mutex for tty
      count changes"), holding a tty lock while closing does not prevent other
      ttys from being opened/closed/hung up, but only prevents lifetime event
      changes for the tty under lock.
      
      Holding the tty lock while waiting for output to drain does prevent
      parallel non-blocking opens (O_NONBLOCK) from advancing or returning
      while the tty lock is held. However, all parallel opens _already_
      block even if the tty lock is dropped while closing and the parallel
      open advances. Blocking in open has been in mainline since at least 2.6.29
      (see tty_port_block_til_ready(); note the test for O_NONBLOCK is _after_
      the wait while ASYNC_CLOSING).
      
      IOW, before this patch a non-blocking open will sleep anyway for the
      _entire_ duration of a parallel hardware shutdown, and when it wakes, the
      error return will cause a release of its tty, and it will restart with
      a fresh attempt to open. Similarly with a blocking open that is already
      waiting; when it's woken, the hardware shutdown has already completed
      to ASYNC_INITIALIZED is not set, which forces a release and restart as
      well.
      
      So, holding the tty lock across the _entire_ close (which is what this
      patch does), even while waiting for output to drain, is equivalent to
      the current outcome wrt parallel opens.
      
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: David Laight <David.Laight@aculab.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Karsten Keil <isdn@linux-pingi.de>
      CC: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      79c1faa4