|
@@ -1417,6 +1417,8 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
|
|
"%s: %s driver does not set tty->port. This will crash the kernel later. Fix the driver!\n",
|
|
"%s: %s driver does not set tty->port. This will crash the kernel later. Fix the driver!\n",
|
|
__func__, tty->driver->name);
|
|
__func__, tty->driver->name);
|
|
|
|
|
|
|
|
+ tty->port->itty = tty;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Structures all installed ... call the ldisc open routines.
|
|
* Structures all installed ... call the ldisc open routines.
|
|
* If we fail here just call release_tty to clean up. No need
|
|
* If we fail here just call release_tty to clean up. No need
|
|
@@ -1552,6 +1554,7 @@ static void release_tty(struct tty_struct *tty, int idx)
|
|
tty->ops->shutdown(tty);
|
|
tty->ops->shutdown(tty);
|
|
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;
|
|
|
|
|
|
if (tty->link)
|
|
if (tty->link)
|
|
tty_kref_put(tty->link);
|
|
tty_kref_put(tty->link);
|