]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:44:34 +0000 (15:44 -0700)
commit7526c8a5e7f87274f825ff76306374f23cb5119b
tree59d23686785bf996b67cce289396e222de8ade0b
parent24fbee81d3bf2c3bcd2ca122058a213dff50defe
n_tty: Fix unsafe reference to "other" ldisc

Orabug: 23330788

[ Upstream commit 6d27a63caad3f13e96cf065d2d96828c2006be6b ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 28b824966ab269de94e0ca640b7c61aedc6a83de)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/tty/n_tty.c