--- zzzz-none-000/linux-4.9.218/drivers/tty/n_tty.c 2020-04-02 15:20:41.000000000 +0000 +++ seale-7590ax-750/linux-4.9.218/drivers/tty/n_tty.c 2023-03-29 10:59:07.000000000 +0000 @@ -2313,6 +2313,12 @@ return retval; } + if (tty->driver->ops->avm_console_enabled) { + if (!tty->driver->ops->avm_console_enabled(tty)) { + return nr; + } + } + down_read(&tty->termios_rwsem); /* Write out any echoed characters that are still pending */