All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] printk for 4.13
Date: Thu, 6 Jul 2017 09:53:28 +0900	[thread overview]
Message-ID: <20170706005328.GB7195@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <20170706004404.GA7195@jagdpanzerIV.localdomain>

On (07/06/17 09:44), Sergey Senozhatsky wrote:
> > No, this is entirely buggered.
> > 
> > You can't just do
> > 
> >    raw_spin_is_locked(&logbuf_lock)
> > 
> > to test whether you can get the logbuf_lock and then call vprintk_default().
> > 
> > It's not just about deadlock avoidance, the code will call things like
> > down_trylock() on the console semaphore, and that operation is
> > fundamentally not NMI-safe. The semaphore count is literally protected
> > by a irq-safe (BUT NOT NMI-SAFE!) semaphore spinlock.
> >
> > So now you can instead deadlock just on the internal console semaphore
> > spinlock (ie somebody is doing "console_lock()", NMI comes in, *BOOM*.
> 
> you are right. but
> 

just in case if my previous email was too hard to follow, may be the
link below will explain it in a less broken language. (I'm sorry, I'm
on medication now and didn't have enough coffee yet.)

https://marc.info/?l=linux-kernel&m=149265908228203&w=2

	-ss

  reply	other threads:[~2017-07-06  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 14:24 [GIT PULL] printk for 4.13 Petr Mladek
2017-07-05 18:23 ` Linus Torvalds
2017-07-06  0:44   ` Sergey Senozhatsky
2017-07-06  0:53     ` Sergey Senozhatsky [this message]
2017-07-06  1:15     ` Linus Torvalds
2017-07-06  1:18       ` 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=20170706005328.GB7195@jagdpanzerIV.localdomain \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=torvalds@linux-foundation.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.