[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180711114124.3eb23fca@gandalf.local.home>
Date: Wed, 11 Jul 2018 11:41:24 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Daniel Vetter <daniel@...ll.ch>,
Thomas Zimmermann <tzimmermann@...e.de>,
Petr Mladek <pmladek@...e.com>,
Linux Fbdev development list <linux-fbdev@...r.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCH v5 2/3] fbcon: Call WARN_CONSOLE_UNLOCKED() where
applicable
On Wed, 11 Jul 2018 17:35:10 +0200
Hans de Goede <hdegoede@...hat.com> wrote:
> OK, so if we don't remove it, we should probably make it so that it
> can be used without triggering any WARN_ONs, which would require changing
> the existing WARN_CONSOLE_UNLOCKED() so that the calls from drivers/tty/vt/vt.c
> also do not trigger it ?
>
> I guess one can just ignore the oopses when debugging, but debugging surely
> would be easier if there are just no oopses ?
What about adding this patch (untested, not even compiled), and then
set it from the fb module.
-- Steve
diff --git a/include/linux/console.h b/include/linux/console.h
index dfd6b0e97855..11cd4956a57f 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -200,8 +200,10 @@ void vcs_make_sysfs(int index);
void vcs_remove_sysfs(int index);
/* Some debug stub to catch some of the obvious races in the VT code */
+extern bool ignore_console_lock_warning;
#if 1
-#define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress)
+#define WARN_CONSOLE_UNLOCKED() \
+ WARN_ON(!ignore_console_lock_warning && !is_console_locked() && !oops_in_progress)
#else
#define WARN_CONSOLE_UNLOCKED()
#endif
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 247808333ba4..fa15d7ddf0c4 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -66,6 +66,9 @@ int console_printk[4] = {
CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */
};
+bool ignore_console_lock_warning;
+EXPORT_SYMBOL(ignore_console_lock_warning);
+
/*
* Low level drivers may need that to know if they can schedule in
* their unblank() callback or not. So let's export it.
Powered by blists - more mailing lists