Commit 64e377dc authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: Reset itty for other pty

Commit 19ffd68f
('pty: Remove redundant itty reset') introduced a regression
whereby the other pty's linkage is not cleared on teardown.
This triggers a false positive diagnostic in testing.

Properly reset the itty linkage.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Cc: stable <stable@vger.kernel.org> # 3.10
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7879a9f9
...@@ -1618,6 +1618,8 @@ static void release_tty(struct tty_struct *tty, int idx) ...@@ -1618,6 +1618,8 @@ static void release_tty(struct tty_struct *tty, int idx)
tty_free_termios(tty); tty_free_termios(tty);
tty_driver_remove_tty(tty->driver, tty); tty_driver_remove_tty(tty->driver, tty);
tty->port->itty = NULL; tty->port->itty = NULL;
if (tty->link)
tty->link->port->itty = NULL;
cancel_work_sync(&tty->port->buf.work); cancel_work_sync(&tty->port->buf.work);
if (tty->link) if (tty->link)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment