summaryrefslogtreecommitdiffstats
path: root/kernel/kernel/printk
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel/printk')
-rw-r--r--kernel/kernel/printk/braille.c4
-rw-r--r--kernel/kernel/printk/printk.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/kernel/kernel/printk/braille.c b/kernel/kernel/printk/braille.c
index 276762f3a..d5760c42f 100644
--- a/kernel/kernel/printk/braille.c
+++ b/kernel/kernel/printk/braille.c
@@ -9,10 +9,10 @@
char *_braille_console_setup(char **str, char **brl_options)
{
- if (!memcmp(*str, "brl,", 4)) {
+ if (!strncmp(*str, "brl,", 4)) {
*brl_options = "";
*str += 4;
- } else if (!memcmp(str, "brl=", 4)) {
+ } else if (!strncmp(*str, "brl=", 4)) {
*brl_options = *str + 4;
*str = strchr(*brl_options, ',');
if (!*str)
diff --git a/kernel/kernel/printk/printk.c b/kernel/kernel/printk/printk.c
index f75e4b0c6..c747bdfa1 100644
--- a/kernel/kernel/printk/printk.c
+++ b/kernel/kernel/printk/printk.c
@@ -1527,6 +1527,11 @@ static void call_console_drivers(int level,
if (!console_drivers)
return;
+ if (IS_ENABLED(CONFIG_PREEMPT_RT_BASE)) {
+ if (in_irq() || in_nmi())
+ return;
+ }
+
migrate_disable();
for_each_console(con) {
if (exclusive_console && con != exclusive_console)
@@ -2464,6 +2469,11 @@ void console_unblank(void)
{
struct console *c;
+ if (IS_ENABLED(CONFIG_PREEMPT_RT_BASE)) {
+ if (in_irq() || in_nmi())
+ return;
+ }
+
/*
* console_unblank can no longer be called in interrupt context unless
* oops_in_progress is set to 1..