All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	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, "4 . 13+" <stable@vger.kernel.org>
Subject: Re: [PATCH] printk/nmi: Prevent deadlock when serializing NMI backtraces
Date: Wed, 23 May 2018 11:01:07 +0900	[thread overview]
Message-ID: <20180523020107.GA8465@jagdpanzerIV> (raw)
In-Reply-To: <20180522174320.10ced885@gandalf.local.home>

On (05/22/18 17:43), Steven Rostedt wrote:
> > CPU0			CPU1			CPU2
> > 
> > printk()
> >   vprintk_emit()
> >     spin_lock(&logbuf_lock)
> > 
> > 						trigger_all_cpu_backtrace()
> > 						  raise()
> > 
> > 			nmi_enter()
> > 			  printk_nmi_enter()
> > 			    if (this_cpu_read(printk_context)
> > 			      & PRINTK_SAFE_CONTEXT_MASK)
> > 			      // false
> > 			    else
> > 			      // looks safe to use printk_deferred()
> > 			      this_cpu_or(printk_context,
> > 				PRINTK_NMI_DEFERRED_CONTEXT_MASK);
> > 
> > 			  nmi_cpu_backtrace()
> > 			    arch_spin_lock(&lock);
> 
> What branch is this based on, because I can't find the
> "arch_spin_lock()" you are talking about here.

This arch_spin_lock() is in lib/nmi_backtrace.c

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/nmi_backtrace.c?h=v4.17-rc6#n94

	-ss

  reply	other threads:[~2018-05-23  2:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 14:39 [PATCH] printk/nmi: Prevent deadlock when serializing NMI backtraces Petr Mladek
2018-05-18  2:07 ` Sergey Senozhatsky
2018-05-18  6:38   ` Sergey Senozhatsky
2018-05-18  8:10     ` Petr Mladek
2018-05-22 21:43 ` Steven Rostedt
2018-05-23  2:01   ` Sergey Senozhatsky [this message]
2018-05-28 12:27     ` Petr Mladek
2018-06-05 12:47 ` Petr Mladek
2018-06-06  5:10   ` Sergey Senozhatsky
2018-06-06 10:33     ` Sergey Senozhatsky
2018-06-08 10:48       ` Petr Mladek
2018-06-18  6:37         ` Sergey Senozhatsky
2018-06-18  9:39           ` Petr Mladek
2018-06-18 10:07             ` Sergey Senozhatsky
2018-06-19  7:52               ` Petr Mladek
2018-06-19  8:27                 ` Sergey Senozhatsky
2018-06-19 13:23                   ` Steven Rostedt
2018-06-20  1:58                     ` Sergey Senozhatsky
2018-06-20  2:32                       ` Steven Rostedt
2018-06-20  4:17                         ` Sergey Senozhatsky
2018-06-06 11:15     ` Petr Mladek
2018-06-07  5:40       ` Sergey Senozhatsky

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=20180523020107.GA8465@jagdpanzerIV \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.