Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305449

[PATCH v2 00/10] Rework tty_reopen()

From Peter Hurley <peter@hurleysoftware.com>
Newsgroups linux.kernel
Subject [PATCH v2 00/10] Rework tty_reopen()
Date 2016-01-10 06:20 +0100
Message-ID <qPgA1-87H-1@gated-at.bofh.it> (permalink)
References <qzDqV-2GJ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Greg,

I re-ordered the patches in this series because the first two patches
fix regressions in 4.4-rc. (I did not originally write the patches
to fix regressions; that's just how it turned out).

Obviously, it's too late for those to make 4.4 but at least this way
they're ready for 4.4.1 stable.

Also, Herton Krzesinski brought to my attention a long-resident problem
with releasing the devpts index when the last file reference is /dev/tty.
Since that impacted the tty driver remove() method changes, I just
removed those patches from this series.

original message follows:

This patch series implements two important improvements to tty open()
behavior: interruptible open() and automatic retry when tty teardown
has already commenced.

Interruptible open() allows signals to cancel the open wait if stalled
waiting for tty teardown to complete.

Automatic retry of tty open() when racing a tty teardown now makes tty
open() fully POSIX compliant. For some time, the Linux kernel has
returned EIO from open() under certain circumstances. This happens when
tty_open() observes a valid tty from driver lookup but the tty is
being released (in final close) and teardown is about to commence.

The observable userspace change is that userspace will no longer need
to retry open() on EIO error.

This series also continues the ongoing effort to cleanup and reduce the
kernel tty interface.

Regards,

Peter Hurley (10):
  tty: Wait interruptibly for tty lock on reopen
  tty: Retry failed reopen if tty teardown in-progress
  tty: Fix ldisc leak in failed tty_init_dev()
  tty: Remove !tty check from free_tty_struct()
  tty: Fix tty_init_termios() declaration
  tty: Re-declare tty_driver_remove_tty() file scope
  pty: Remove pty_unix98_shutdown()
  tty: Remove __lockfunc annotation from tty lock functions
  tty: Consolidate noctty checks in tty_open()
  tty: Refactor tty_open()

 drivers/tty/pty.c            |  27 +------
 drivers/tty/tty_io.c         | 174 ++++++++++++++++++++++---------------------
 drivers/tty/tty_ldisc.c      |  21 +++---
 drivers/tty/tty_mutex.c      |  16 +++-
 drivers/usb/serial/console.c |   6 +-
 include/linux/tty.h          |  16 ++--
 6 files changed, 121 insertions(+), 139 deletions(-)

-- 
2.7.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/10] Rework tty_reopen() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 01/10] tty: Wait interruptibly for tty lock on reopen Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 06/10] tty: Re-declare tty_driver_remove_tty() file scope Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 03/10] tty: Fix ldisc leak in failed tty_init_dev() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 05/10] tty: Fix tty_init_termios() declaration Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 04/10] tty: Remove !tty check from free_tty_struct() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 07/10] pty: Remove pty_unix98_shutdown() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 08/10] tty: Remove __lockfunc annotation from tty lock functions Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 02/10] tty: Retry failed reopen if tty teardown in-progress Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100
  [PATCH v2 10/10] tty: Refactor tty_open() Peter Hurley <peter@hurleysoftware.com> - 2016-01-10 06:20 +0100

csiph-web