From: Yong Zhang <yong.zhang0@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, James Morris <jmorris@namei.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Kevin Cernekee <cernekee@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [RFC] [PATCH] printk: Don't emit console_cpu_notify() for CPU_DYING
Date: Fri, 18 Nov 2011 10:19:24 +0800 [thread overview]
Message-ID: <1321582764-22218-1-git-send-email-yong.zhang0@gmail.com> (raw)
When running -rt, I got some warning when doing cpu hotplug,
for details please check:
http://marc.info/?l=linux-kernel&m=132143661616297&w=2
But seems the problem also exists in mainline, a typical
scenario is:
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);
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: James Morris <jmorris@namei.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
kernel/printk.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index 535bc3b..ba0393e 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1223,7 +1223,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self,
switch (action) {
case CPU_ONLINE:
case CPU_DEAD:
- case CPU_DYING:
case CPU_DOWN_FAILED:
case CPU_UP_CANCELED:
console_lock();
--
1.7.5.4
next reply other threads:[~2011-11-18 2:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 2:19 Yong Zhang [this message]
2011-11-18 19:01 ` [RFC] [PATCH] printk: Don't emit console_cpu_notify() for CPU_DYING Andrew Morton
2011-11-19 5:15 ` Yong Zhang
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=1321582764-22218-1-git-send-email-yong.zhang0@gmail.com \
--to=yong.zhang0@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=cernekee@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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).