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

Changed files
+2 -3
drivers
tty
+2 -3
drivers/tty/tty_io.c
··· 2049 2049 if (tty) { 2050 2050 mutex_unlock(&tty_mutex); 2051 2051 retval = tty_lock_interruptible(tty); 2052 + tty_kref_put(tty); /* drop kref from tty_driver_lookup_tty() */ 2052 2053 if (retval) { 2053 2054 if (retval == -EINTR) 2054 2055 retval = -ERESTARTSYS; 2055 2056 tty = ERR_PTR(retval); 2056 2057 goto out; 2057 2058 } 2058 - /* safe to drop the kref from tty_driver_lookup_tty() */ 2059 - tty_kref_put(tty); 2060 2059 retval = tty_reopen(tty); 2061 2060 if (retval < 0) { 2062 2061 tty_unlock(tty); ··· 2157 2158 read_lock(&tasklist_lock); 2158 2159 spin_lock_irq(&current->sighand->siglock); 2159 2160 noctty = (filp->f_flags & O_NOCTTY) || 2160 - device == MKDEV(TTY_MAJOR, 0) || 2161 + (IS_ENABLED(CONFIG_VT) && device == MKDEV(TTY_MAJOR, 0)) || 2161 2162 device == MKDEV(TTYAUX_MAJOR, 1) || 2162 2163 (tty->driver->type == TTY_DRIVER_TYPE_PTY && 2163 2164 tty->driver->subtype == PTY_TYPE_MASTER);