linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Petr Mladek <pmladek@suse.com>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH v5 2/3] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable
Date: Wed, 11 Jul 2018 11:41:24 -0400	[thread overview]
Message-ID: <20180711114124.3eb23fca@gandalf.local.home> (raw)
In-Reply-To: <892782ad-4b97-8eda-f5b0-3a893b3a5f84@redhat.com>

On Wed, 11 Jul 2018 17:35:10 +0200
Hans de Goede <hdegoede@redhat.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.

  reply	other threads:[~2018-07-11 15:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180628090357epcas5p28361ab4b3ce11c179a167548f4851983@epcas5p2.samsung.com>
2018-06-28  9:03 ` [PATCH v5 0/3] console/fbcon: Add support for deferred console takeover Hans de Goede
2018-06-28  9:03   ` [PATCH v5 1/3] printk: Export is_console_locked Hans de Goede
2018-06-28  9:03   ` [PATCH v5 2/3] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable Hans de Goede
2018-07-11 14:46     ` Thomas Zimmermann
2018-07-11 14:52       ` Steven Rostedt
2018-07-11 15:01         ` Hans de Goede
2018-07-11 15:07           ` Daniel Vetter
2018-07-11 15:07         ` Thomas Zimmermann
2018-07-11 15:14           ` Hans de Goede
2018-07-11 15:28             ` Daniel Vetter
2018-07-11 15:35               ` Hans de Goede
2018-07-11 15:41                 ` Steven Rostedt [this message]
2018-07-11 15:42                 ` Daniel Vetter
2018-07-11 17:35                   ` Hans de Goede
2018-07-11 17:56                     ` Daniel Vetter
2018-07-11 19:19                       ` Steven Rostedt
2018-07-11 19:41                         ` Hans de Goede
2018-07-12 10:16                         ` Thomas Zimmermann
2018-07-11 23:59       ` Sergey Senozhatsky
2018-06-28  9:03   ` [PATCH v5 3/3] console/fbcon: Add support for deferred console takeover Hans de Goede
2018-07-03 16:13     ` Sergey Senozhatsky
2018-07-03 16:14       ` Steven Rostedt
2018-07-03 16:36         ` Sergey Senozhatsky
2018-06-28 13:50   ` [PATCH v5 0/3] " Bartlomiej Zolnierkiewicz
2018-06-28 15:24     ` Hans de Goede
2018-06-28 22:44     ` Gustavo Padovan
2018-06-29 10:08       ` Bartlomiej Zolnierkiewicz
2018-06-29 12:51         ` Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711114124.3eb23fca@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).