From: Peter Hurley Date: Wed, 5 Nov 2014 17:12:48 +0000 (-0500) Subject: tty: Check tty->count instead of TTY_CLOSING in tty_reopen() X-Git-Tag: omap-for-v3.19/fixes-rc1~86^2~189 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=216030ec55e08646be629ee32725c0189ad74c9a;p=pandora-kernel.git 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 Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed