[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1590751607-29676-3-git-send-email-sumit.garg@linaro.org>
Date: Fri, 29 May 2020 16:56:45 +0530
From: Sumit Garg <sumit.garg@...aro.org>
To: daniel.thompson@...aro.org
Cc: kgdb-bugreport@...ts.sourceforge.net, jason.wessel@...driver.com,
dianders@...omium.org, pmladek@...e.com,
sergey.senozhatsky@...il.com, gregkh@...uxfoundation.org,
jslaby@...e.com, linux-kernel@...r.kernel.org,
Sumit Garg <sumit.garg@...aro.org>
Subject: [PATCH v4 2/4] 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@...il.com>
Signed-off-by: Sumit Garg <sumit.garg@...aro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@...aro.org>
---
kernel/debug/kdb/kdb_io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c
index e46f33e..fad38eb 100644
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -564,6 +564,8 @@ static void kdb_msg_write(char *msg, int msg_len)
kdb_io_write(msg, msg_len);
for_each_console(c) {
+ if (!(c->flags & CON_ENABLED))
+ continue;
c->write(c, msg, msg_len);
touch_nmi_watchdog();
}
--
2.7.4
Powered by blists - more mailing lists