Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp949932imm; Wed, 11 Jul 2018 14:04:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcVn3wriRcFx8DF8fqAXKQUT/kp7oErUt/076W7ieI/fF0Ve9JhLXBhcNUUIzyfAjtF/uu0 X-Received: by 2002:a62:3545:: with SMTP id c66-v6mr215388pfa.63.1531343051909; Wed, 11 Jul 2018 14:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531343051; cv=none; d=google.com; s=arc-20160816; b=SEhqtmJZxXWH/RznXhD7DOHQiED7mbued6/F3FY7bP5JtKshQ8Ot5GKzlWtA9WDJ5z erxyLu02UpXIexm3X7T/omVhI9l4jbbmMpFTjHjdGVae2mEOojvB10DLjbQ8vETrgZw4 Rk6UgTCUdXzUpTlZah3VwAli0pZDQyXz83bNWwOBbuGnVvuw3OkbpErshNR8h1eS5a4a CPBBfadFd55y3hF28/8/exHo/O9V6Sn+WLFVnDa2sH5huAHlBFho0Lj83+p5VPx7564t UxUHiygy/iwx4G9vHOjinj6PUdtX8Y51PD88lagFND/IREDLbhxxFAh2iJSXsLhUzmFU CoDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=P4FzY+rQLyIcuFXGp8l0AryuRmQS8QKtWJswSeVCnjY=; b=tYBQFfQr3SCI/w5RNVVvuqQW5wlb7UEGXlszeT94vCfyJ0zxJKGp3n3xwvO+8PO0bl v5BfoacpU+P34iQPHb/1LkqvXMa3MSIxD+F06iyiK+AqOkdqjivk3B1mWdbw0aGS4odH PWgxMFeOUvQBSckokZsyIdiF3aCKmXiq+gIEAimUZ4cMHG/DpFLdiSIWRdB/wf0aUKrg S8xUGt+xpqap1qFpPcWd/f9uq3uVKN20y3QC6SavJbGtykkAmiuKKPHX9mCS4nP46Hco JPDOUitY/46s5YVoAgMzZaWgxy0NUXNsEGXiIYW15AVcQapW0EjcdgiLu0b0fncRojFt p5GA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15-v6si16320137pls.439.2018.07.11.14.03.56; Wed, 11 Jul 2018 14:04:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389277AbeGKPqW (ORCPT + 99 others); Wed, 11 Jul 2018 11:46:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:59794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732637AbeGKPqV (ORCPT ); Wed, 11 Jul 2018 11:46:21 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D08320875; Wed, 11 Jul 2018 15:41:26 +0000 (UTC) Date: Wed, 11 Jul 2018 11:41:24 -0400 From: Steven Rostedt To: Hans de Goede Cc: Daniel Vetter , Thomas Zimmermann , Petr Mladek , Linux Fbdev development list , Bartlomiej Zolnierkiewicz , Linux Kernel Mailing List , dri-devel , Sergey Senozhatsky Subject: Re: [PATCH v5 2/3] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable Message-ID: <20180711114124.3eb23fca@gandalf.local.home> In-Reply-To: <892782ad-4b97-8eda-f5b0-3a893b3a5f84@redhat.com> References: <20180628090351.15581-1-hdegoede@redhat.com> <20180628090351.15581-3-hdegoede@redhat.com> <717e6337-e7a6-7a92-1c1b-8929a25696b5@suse.de> <20180711105255.32803a3c@gandalf.local.home> <7ec11c96-7dd5-ec12-548e-7c1fa9b883e8@suse.de> <892782ad-4b97-8eda-f5b0-3a893b3a5f84@redhat.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Jul 2018 17:35:10 +0200 Hans de Goede 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.