From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:40807 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934863AbeF2BrI (ORCPT ); Thu, 28 Jun 2018 21:47:08 -0400 Date: Fri, 29 Jun 2018 10:47:03 +0900 From: Sergey Senozhatsky To: Petr Mladek , Steven Rostedt Cc: Sergey Senozhatsky , Sergey Senozhatsky , Peter Zijlstra , Tetsuo Handa , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 3/3] printk/nmi: Prevent deadlock when accessing the main log buffer in NMI Message-ID: <20180629014703.GA614@jagdpanzerIV> References: <20180627140817.27764-1-pmladek@suse.com> <20180627142028.11259-1-pmladek@suse.com> <20180628022507.GD481@jagdpanzerIV> <20180628094125.cq5qunckjyxhbovb@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180628094125.cq5qunckjyxhbovb@pathway.suse.cz> Sender: stable-owner@vger.kernel.org List-ID: On (06/28/18 11:41), Petr Mladek wrote: > > > > A side note: This nesting also handles recursive printk-s for us. > > > > NMI: > > printk_nmi_enter > > ftrace_dump > > printk_nmi_direct_enter > > vprintk_func > > spin_lock(logbuf_lock) > > vprintk_store > > vsprintf > > WARN_ON > > vprintk_func > > vprintk_nmi > > Uff, it seems that the current design is "good" at lest from some > points of view. yep yep > > > + len = vprintk_store(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args); > > > + raw_spin_unlock(&logbuf_lock); > > > + defer_console(); > > > + return len; > > > + } > > > > So, maybe, something a bit better than defer_console(). > > I am not super happy with the name either. But wakeup_console(), > schedule_console(), or queue_console() looked confusing. Hmm. defer_console() makes me think that we are dealing with that fbcon=nodefer and deferred console takeover thing here. So I summon Mr. Rostedt! Does schedule_console_output() look bad? What about defer_console_output()? Any other ideas? -ss