diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 0c880f17d27ee1bd145479e05548066107848077..88dac3b7936933cc7c6644451c837aa6c6585c9f 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -33,7 +33,9 @@ static int tty_port_default_receive_buf(struct tty_port *port, if (!disc) return 0; + mutex_lock(&tty->atomic_write_lock); ret = tty_ldisc_receive_buf(disc, p, (char *)f, count); + mutex_unlock(&tty->atomic_write_lock); tty_ldisc_deref(disc);