projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UPSTREAM: drm/edid: Extract SADs properly from multiple audio data blocks
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
tty
/
tty_ldisc.c
diff --git
a/drivers/tty/tty_ldisc.c
b/drivers/tty/tty_ldisc.c
index 629e3c865072035f14fd4e6ece5a2544bcbf713c..9bee25cfa0be5e5a39cd00a2aa8e2fd57ac69096 100644
(file)
--- a/
drivers/tty/tty_ldisc.c
+++ b/
drivers/tty/tty_ldisc.c
@@
-417,6
+417,10
@@
EXPORT_SYMBOL_GPL(tty_ldisc_flush);
* they are not on hot paths so a little discipline won't do
* any harm.
*
* they are not on hot paths so a little discipline won't do
* any harm.
*
+ * The line discipline-related tty_struct fields are reset to
+ * prevent the ldisc driver from re-using stale information for
+ * the new ldisc instance.
+ *
* Locking: takes termios_rwsem
*/
* Locking: takes termios_rwsem
*/
@@
-425,6
+429,9
@@
static void tty_set_termios_ldisc(struct tty_struct *tty, int num)
down_write(&tty->termios_rwsem);
tty->termios.c_line = num;
up_write(&tty->termios_rwsem);
down_write(&tty->termios_rwsem);
tty->termios.c_line = num;
up_write(&tty->termios_rwsem);
+
+ tty->disc_data = NULL;
+ tty->receive_room = 0;
}
/**
}
/**