linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH -rt] printk: Don't emit console_cpu_notify() for CPU_DYING
Date: Thu, 17 Nov 2011 13:29:06 +0800	[thread overview]
Message-ID: <20111117052906.GC14492@zhy> (raw)
In-Reply-To: <alpine.LFD.2.02.1111161547560.4902@ionos>

On Wed, Nov 16, 2011 at 03:48:11PM +0100, Thomas Gleixner wrote:
> On Wed, 16 Nov 2011, Steven Rostedt wrote:
> > Thomas, doesn't printk not print to serial in atomic contexts? Or did

I guess you mean console_trylock_for_printk() will fail in atomic context?
If so, yeah, that doesn't change.

But the issue is console_cpu_notify() call console_lock() directly.
That means below scenario could also happen in mainline:

	CPU A				CPU B

doing printk with console_sem held
				take_cpu_down();
				  cpu_notify(CPU_DYING);
				    console_cpu_notify();
				      console_lock();
				        down(&console_sem);
					  *bang*
  up(&console_sem);

Sounds I should also send this patch to mainline.

Thanks,
Yong

      reply	other threads:[~2011-11-17  5:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16  9:42 [PATCH -rt] printk: Don't emit console_cpu_notify() for CPU_DYING Yong Zhang
2011-11-16 14:19 ` Steven Rostedt
2011-11-16 14:48   ` Thomas Gleixner
2011-11-17  5:29     ` Yong Zhang [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=20111117052906.GC14492@zhy \
    --to=yong.zhang0@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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).