diff options
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r-- | drivers/char/n_tty.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 2e50f4dfc79..5269fa01129 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c @@ -1969,7 +1969,9 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, tty->ops->flush_chars(tty); } else { while (nr > 0) { + mutex_lock(&tty->output_lock); c = tty->ops->write(tty, b, nr); + mutex_unlock(&tty->output_lock); if (c < 0) { retval = c; goto break_out; |