--- zzzz-none-000/linux-4.9.276/drivers/tty/n_tty.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/drivers/tty/n_tty.c 2023-04-05 08:19:02.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 */