All of lore.kernel.org
 help / color / mirror / Atom feed
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: [PATCH] Fix scheduling-while-atomic problem in console_cpu_notify()
Date: Mon, 15 Oct 2012 17:31:28 -0700	[thread overview]
Message-ID: <20121016003128.GA5879@linux.vnet.ibm.com> (raw)

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>

diff --git a/kernel/printk.c b/kernel/printk.c
index 66a2ea3..8e23a14 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1889,7 +1889,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:


             reply	other threads:[~2012-10-16  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16  0:31 Paul E. McKenney [this message]
2012-10-16  4:35 ` [PATCH] Fix scheduling-while-atomic problem in console_cpu_notify() Paul E. McKenney
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=20121016003128.GA5879@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 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.