Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: Reset itty for other pty

Commit 19ffd68f816878aed456d5e87697f43bd9e3bd2b
('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: Peter Hurley <peter@hurleysoftware.com>
Cc: stable <stable@vger.kernel.org> # 3.10
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Hurley and committed by
Greg Kroah-Hartman
64e377dc 7879a9f9

+2
+2
drivers/tty/tty_io.c
··· 1618 1618 tty_free_termios(tty); 1619 1619 tty_driver_remove_tty(tty->driver, tty); 1620 1620 tty->port->itty = NULL; 1621 + if (tty->link) 1622 + tty->link->port->itty = NULL; 1621 1623 cancel_work_sync(&tty->port->buf.work); 1622 1624 1623 1625 if (tty->link)