Searched hist:"216030 ec" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/tty/ |
H A D | tty_io.c | 216030ec Wed Nov 05 11:12:48 CST 2014 Peter Hurley <peter@hurleysoftware.com> tty: Check tty->count instead of TTY_CLOSING in tty_reopen()
Although perhaps not obvious, the TTY_CLOSING bit is set when the tty count has been decremented to 0 (which occurs while holding tty_lock). The only other case when tty count is 0 during a re-open is when a legacy BSD pty master has been opened in parallel but after the pty slave, which is unsupported and returns an error.
Thus !tty->count contains the complete set of degenerate conditions under which a tty open fails.
Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 216030ec Wed Nov 05 11:12:48 CST 2014 Peter Hurley <peter@hurleysoftware.com> tty: Check tty->count instead of TTY_CLOSING in tty_reopen() Although perhaps not obvious, the TTY_CLOSING bit is set when the tty count has been decremented to 0 (which occurs while holding tty_lock). The only other case when tty count is 0 during a re-open is when a legacy BSD pty master has been opened in parallel but after the pty slave, which is unsupported and returns an error. Thus !tty->count contains the complete set of degenerate conditions under which a tty open fails. Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|