From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 0/3] printk: Deadlock in NMI regression
Date: Mon, 9 Jul 2018 15:27:57 +0200 [thread overview]
Message-ID: <20180709132757.cpfwn5qcgonzhhhi@pathway.suse.cz> (raw)
In-Reply-To: <20180627140817.27764-1-pmladek@suse.com>
On Wed 2018-06-27 16:08:14, Petr Mladek wrote:
> The commit 719f6a7040f1bdaf96 ("printk: Use the main logbuf in NMI
> when logbuf_lock is available") brought back the possible deadlocks
> in printk() and NMI.
>
> This is rework of the proposed fix, see
> https://lkml.kernel.org/r/20180606111557.xzs6l3lkvg7lq3ts@pathway.suse.cz
>
> I realized that we could rather easily move the check to vprintk_func()
> and still avoid any race. I believe that this is a win-win solution.
>
>
> Changes against v1:
>
> + Move the check from vprintk_emit() to vprintk_func()
> + More straightforward commit message
> + Fix build with CONFIG_PRINTK_NMI disabled
>
>
> Petr Mladek (3):
> printk: Split the code for storing a message into the log buffer
> printk: Create helper function to queue deferred console handling
> printk/nmi: Prevent deadlock when accessing the main log buffer in NMI
>
> include/linux/printk.h | 4 ++++
> kernel/printk/internal.h | 9 ++++++-
> kernel/printk/printk.c | 57 +++++++++++++++++++++++++++-----------------
> kernel/printk/printk_safe.c | 58 +++++++++++++++++++++++++++++----------------
> kernel/trace/trace.c | 4 +++-
> lib/nmi_backtrace.c | 3 ---
> 6 files changed, 87 insertions(+), 48 deletions(-)
JFYI, I have renamed the new function defer_console() to
defer_console_output() and pushed everything to printk.git,
branch for-4.19-nmi.
Best Regards,
Petr
prev parent reply other threads:[~2018-07-09 13:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 14:08 [PATCH v2 0/3] printk: Deadlock in NMI regression Petr Mladek
2018-06-27 14:08 ` [PATCH v2 1/3] printk: Split the code for storing a message into the log buffer Petr Mladek
2018-06-28 2:10 ` Sergey Senozhatsky
2018-06-27 14:08 ` [PATCH v2 2/3] printk: Create helper function to queue deferred console handling Petr Mladek
2018-06-28 2:16 ` Sergey Senozhatsky
2018-06-28 2:19 ` Sergey Senozhatsky
2018-06-27 14:16 ` [PATCH v2 0/3] printk: Deadlock in NMI regression Sergey Senozhatsky
2018-06-27 14:23 ` Sergey Senozhatsky
2018-06-27 14:34 ` Petr Mladek
2018-06-28 9:08 ` Sergey Senozhatsky
2018-06-27 14:20 ` [PATCH v2 3/3] printk/nmi: Prevent deadlock when accessing the main log buffer in NMI Petr Mladek
2018-06-28 2:25 ` Sergey Senozhatsky
2018-06-28 9:41 ` Petr Mladek
2018-06-29 1:47 ` Sergey Senozhatsky
2018-06-29 7:25 ` Petr Mladek
2018-06-29 10:01 ` Sergey Senozhatsky
2018-06-28 2:39 ` [PATCH v2 0/3] printk: Deadlock in NMI regression Sergey Senozhatsky
2018-06-28 10:54 ` Petr Mladek
2018-06-29 1:52 ` Sergey Senozhatsky
2018-07-09 13:27 ` Petr Mladek [this message]
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=20180709132757.cpfwn5qcgonzhhhi@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=stable@vger.kernel.org \
/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).