forked from Minki/linux
TTY fixes for 4.6-rc3
Here are two tty fixes for issues found. One was due to a merge error in 4.6-rc1, and the other a regression fix for UML consoles that broke in 4.6-rc1. Both have been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlcJNlUACgkQMUfUDdst+ymVwwCgwEvpbd9cHK/KkaoK7qpjqDu3 TfwAn0EOY+9DYwBqw8WEAsp/6QVm2R9q =4Clt -----END PGP SIGNATURE----- Merge tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are two tty fixes for issues found. One was due to a merge error in 4.6-rc1, and the other a regression fix for UML consoles that broke in 4.6-rc1. Both have been in linux-next for a while" * tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Fix merge of "tty: Refactor tty_open()" tty: Fix UML console breakage
This commit is contained in:
commit
183c948a3c
@ -2049,14 +2049,13 @@ static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
|
||||
if (tty) {
|
||||
mutex_unlock(&tty_mutex);
|
||||
retval = tty_lock_interruptible(tty);
|
||||
tty_kref_put(tty); /* drop kref from tty_driver_lookup_tty() */
|
||||
if (retval) {
|
||||
if (retval == -EINTR)
|
||||
retval = -ERESTARTSYS;
|
||||
tty = ERR_PTR(retval);
|
||||
goto out;
|
||||
}
|
||||
/* safe to drop the kref from tty_driver_lookup_tty() */
|
||||
tty_kref_put(tty);
|
||||
retval = tty_reopen(tty);
|
||||
if (retval < 0) {
|
||||
tty_unlock(tty);
|
||||
@ -2158,7 +2157,7 @@ retry_open:
|
||||
read_lock(&tasklist_lock);
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
noctty = (filp->f_flags & O_NOCTTY) ||
|
||||
device == MKDEV(TTY_MAJOR, 0) ||
|
||||
(IS_ENABLED(CONFIG_VT) && device == MKDEV(TTY_MAJOR, 0)) ||
|
||||
device == MKDEV(TTYAUX_MAJOR, 1) ||
|
||||
(tty->driver->type == TTY_DRIVER_TYPE_PTY &&
|
||||
tty->driver->subtype == PTY_TYPE_MASTER);
|
||||
|
Loading…
Reference in New Issue
Block a user