pty: Remove redundant itty reset
PATCH 1/1 pty: Remove redundant itty reset
port->itty has already been reset by release_tty() before pty_cleanup() is called.
Call stack:release_tty()
tty_kref_put()
queue_release_one_tty()
release_one_tty() : workqueue
tty->ops->cleanup()
pty_cleanup()
Signed-off-by Peter Hurley <[email protected]>
--- drivers/tty/pty.c | 1 - 1 file changed, 1 deletion(-)
drivers/tty/pty.c +0 -1
@@ -413,7 +413,6 @@ static void pty_unix98_shutdown(struct tty_struct *tty)static void pty_cleanup (struct tty_struct *tty) { - tty->port->itty =NULL ;tty_port_put (tty->port); }
Signature · 1 line
1.8.1.2
PATCH 1/1 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 <[email protected]>
--- drivers/tty/tty_io.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/tty_io.c +2 -0
@@ -1616,6 +1616,8 @@ static void release_tty(struct tty_struct *tty, int idx)tty_free_termios (tty);tty_driver_remove_tty (tty->driver, tty); tty->port->itty =NULL ; +if (tty->link) + tty->link->port->itty =NULL ;cancel_work_sync (&tty->port->buf.work);if (tty->link)
Signature · 1 line
1.8.1.2