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:
parent
9d71b344f8
commit
e8857288bb
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue