diff options
author | Sumit Garg <sumit.garg@linaro.org> | 2020-06-04 15:31:17 +0530 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2020-06-25 12:04:29 +0100 |
commit | e8857288bb620d594c94a219148d18562e52b06e (patch) | |
tree | 2df72cee89b082962593a0805c0329656bf9e351 /kernel/debug/kdb | |
parent | 9d71b344f86f4264a5fae43c997a630e93c0de9b (diff) |
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>
Diffstat (limited to 'kernel/debug/kdb')
-rw-r--r-- | kernel/debug/kdb/kdb_io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c index 2d42a02de40e..58b7d256d0a4 100644 --- a/kernel/debug/kdb/kdb_io.c +++ b/kernel/debug/kdb/kdb_io.c @@ -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(); } |