kdb: Check status of console prior to invoking handlers

Check if a console is enabled prior to invoking corresponding write
handler.

Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/1591264879-25920-3-git-send-email-sumit.garg@linaro.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
This commit is contained in:
Sumit Garg 2020-06-04 15:31:17 +05:30 committed by Daniel Thompson
parent 9d71b344f8
commit e8857288bb

View File

@ -560,6 +560,8 @@ static void kdb_msg_write(const char *msg, int msg_len)
}
for_each_console(c) {
if (!(c->flags & CON_ENABLED))
continue;
c->write(c, msg, msg_len);
touch_nmi_watchdog();
}