diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-03-31 20:05:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-31 20:14:14 -0400 |
commit | da5a0fc6743df9b5a3e9f915a1ed16f45465d529 (patch) | |
tree | 1fcd79503df9d297161d588af978ee996432b6ea | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) |
tty: Fix UML console breakage
User-Mode Linux supplies an alternate TTY_MAJOR driver for stdio console,
so the noctty check in tty_open() must apply only to VT driver tty0
devnode and not the UML console driver tty0 devnode.
Fixes: 11e1d4aa4da1 ("tty: Consolidate noctty checks in tty_open()")
Reported-by: Richard Weinberger <richard.weinberger@gmail.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/tty_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 8d26ed79bb4c..876878a7704f 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -2158,7 +2158,7 @@ retry_open: | |||
2158 | read_lock(&tasklist_lock); | 2158 | read_lock(&tasklist_lock); |
2159 | spin_lock_irq(¤t->sighand->siglock); | 2159 | spin_lock_irq(¤t->sighand->siglock); |
2160 | noctty = (filp->f_flags & O_NOCTTY) || | 2160 | noctty = (filp->f_flags & O_NOCTTY) || |
2161 | device == MKDEV(TTY_MAJOR, 0) || | 2161 | (IS_ENABLED(CONFIG_VT) && device == MKDEV(TTY_MAJOR, 0)) || |
2162 | device == MKDEV(TTYAUX_MAJOR, 1) || | 2162 | device == MKDEV(TTYAUX_MAJOR, 1) || |
2163 | (tty->driver->type == TTY_DRIVER_TYPE_PTY && | 2163 | (tty->driver->type == TTY_DRIVER_TYPE_PTY && |
2164 | tty->driver->subtype == PTY_TYPE_MASTER); | 2164 | tty->driver->subtype == PTY_TYPE_MASTER); |