aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 68865d9af8a0..16793eccc6ae 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -153,6 +153,12 @@ static void n_tty_set_room(struct tty_struct *tty)
153 if (left && !old_left) { 153 if (left && !old_left) {
154 WARN_RATELIMIT(tty->port->itty == NULL, 154 WARN_RATELIMIT(tty->port->itty == NULL,
155 "scheduling with invalid itty\n"); 155 "scheduling with invalid itty\n");
156 /* see if ldisc has been killed - if so, this means that
157 * even though the ldisc has been halted and ->buf.work
158 * cancelled, ->buf.work is about to be rescheduled
159 */
160 WARN_RATELIMIT(test_bit(TTY_LDISC_HALTED, &tty->flags),
161 "scheduling buffer work for halted ldisc\n");
156 schedule_work(&tty->port->buf.work); 162 schedule_work(&tty->port->buf.work);
157 } 163 }
158} 164}
@@ -1624,6 +1630,8 @@ static int n_tty_open(struct tty_struct *tty)
1624 goto err_free_bufs; 1630 goto err_free_bufs;
1625 1631
1626 tty->disc_data = ldata; 1632 tty->disc_data = ldata;
1633 /* indicate buffer work may resume */
1634 clear_bit(TTY_LDISC_HALTED, &tty->flags);
1627 reset_buffer_flags(tty); 1635 reset_buffer_flags(tty);
1628 tty_unthrottle(tty); 1636 tty_unthrottle(tty);
1629 ldata->column = 0; 1637 ldata->column = 0;