]> git.karo-electronics.de Git - karo-tx-linux.git/commit
n_tty: Fix unsafe reference to "other" ldisc
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Jan 2016 06:40:56 +0000 (22:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2016 07:17:54 +0000 (23:17 -0800)
commit6d27a63caad3f13e96cf065d2d96828c2006be6b
tree9ac73a342940bb6c283e37f23e8384155c59dfb1
parent5c17c861a357e9458001f021a7afa7aab9937439
n_tty: Fix unsafe reference to "other" ldisc

Although n_tty_check_unthrottle() has a valid ldisc reference (since
the tty core gets the ldisc ref in tty_read() before calling the line
discipline read() method), it does not have a valid ldisc reference to
the "other" pty of a pty pair. Since getting an ldisc reference for
tty->link essentially open-codes tty_wakeup(), just replace with the
equivalent tty_wakeup().

Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c