From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: cernekee@gmail.com, torbenh@gmx.de,
torvalds@linux-foundation.org, tglx@linutronix.de,
srivatsa.bhat@linux.vnet.ibm.com
Subject: Re: [PATCH] Fix scheduling-while-atomic problem in console_cpu_notify()
Date: Mon, 15 Oct 2012 21:35:59 -0700 [thread overview]
Message-ID: <20121016043559.GA32179@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121016003128.GA5879@linux.vnet.ibm.com>
On Mon, Oct 15, 2012 at 05:31:28PM -0700, Paul E. McKenney wrote:
> The console_cpu_notify( function runs with interrupts disabled in
> the CPU_DEAD case. It therefore cannot block, for example, as will
> happen when it calls console_lock(). Therefore, remove the CPU_DEAD
> leg of the switch statement to avoid this problem.
>
> Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
s/CPU_DEAD/CPU_DYING/
Apparently it is a bad idea to compose and send a patch while in a
C++ standards committee meeting where people are arguing about async
futures... Fixed patch below.
Thanx, Paul
------------------------------------------------------------------------
printk: Fix scheduling-while-atomic problem in console_cpu_notify()
The console_cpu_notify( function runs with interrupts disabled in
the CPU_DYING case. It therefore cannot block, for example, as will
happen when it calls console_lock(). Therefore, remove the CPU_DYING
leg of the switch statement to avoid this problem.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/printk.c b/kernel/printk.c
index 66a2ea3..2d607f4 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1890,7 +1890,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();
next prev parent reply other threads:[~2012-10-16 4:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 0:31 [PATCH] Fix scheduling-while-atomic problem in console_cpu_notify() Paul E. McKenney
2012-10-16 4:35 ` Paul E. McKenney [this message]
2012-10-16 5:31 ` Srivatsa S. Bhat
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=20121016043559.GA32179@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=cernekee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=torbenh@gmx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox