public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: julie Sullivan <kernelmail.jms@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: 3.0-rc kernels unbootable since -rc3
Date: Sun, 10 Jul 2011 16:14:49 -0700	[thread overview]
Message-ID: <20110710231449.GQ6014@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAAVPGOMafp_+45X=7asHe=MqaHY8CiJYsf2GZ3qOPrWpjctHVQ@mail.gmail.com>

On Sun, Jul 10, 2011 at 10:50:48PM +0100, julie Sullivan wrote:
> > Very cool!  Thank you very much for the testing --
> 
> My pleasure
> 
> > I will put together an
> > upstreamable commit with your Tested-by.

And here is what I am proposing sending upstream.  I have your Tested-by,
but had to make a small but very real change in order to make it work
under all configurations that I test under.  So could you please try
the attached patch out?  I am particularly interested in how it works
out when CONFIG_RCU_BOOST=n.

							Thanx, Paul

------------------------------------------------------------------------

rcu: Prevent RCU callbacks from executing during early boot

Under some rare but real combinations of configuration parameters, RCU
callbacks are posted during early boot that use kernel facilities that
are not yet initialized.  Therefore, when these callbacks are invoked,
hard hangs and crashes ensue.  This commit therefore prevents RCU
callbacks from being invoked until after the scheduler is up and running.

It might well turn out that a better approach is to identify the specific
RCU callbacks that are causing this problem, but that discussion will
wait until such time as someone really needs an RCU callback to be
invoked during early boot.

Reported-by: julie Sullivan <kernelmail.jms@gmail.com>
Tested-by: julie Sullivan <kernelmail.jms@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 7e59ffb..4c0210f 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1467,7 +1467,7 @@ static void rcu_process_callbacks(struct softirq_action *unused)
  */
 static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
 {
-	if (likely(!rsp->boost)) {
+	if (likely(rcu_scheduler_active && !rsp->boost)) {
 		rcu_do_batch(rsp, rdp);
 		return;
 	}
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 14dc7dd..ca3c6dc 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1703,7 +1703,7 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
 
 static void invoke_rcu_callbacks_kthread(void)
 {
-	WARN_ON_ONCE(1);
+	WARN_ON_ONCE(rcu_scheduler_active);
 }
 
 static void rcu_preempt_boost_start_gp(struct rcu_node *rnp)

  reply	other threads:[~2011-07-10 23:15 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 21:10 PROBLEM: 3.0-rc kernels unbootable since -rc3 julie Sullivan
2011-07-06 21:23 ` Paul E. McKenney
2011-07-07 19:31   ` Paul E. McKenney
2011-07-07 19:47   ` julie Sullivan
2011-07-07 19:58     ` Paul E. McKenney
2011-07-07 20:28       ` julie Sullivan
2011-07-07 20:47       ` julie Sullivan
2011-07-08  0:29         ` Paul E. McKenney
2011-07-09 10:09           ` Paul E. McKenney
2011-07-10  0:45             ` julie Sullivan
2011-07-10  3:25               ` Paul E. McKenney
2011-07-10 16:38                 ` julie Sullivan
2011-07-10 17:16                   ` Paul E. McKenney
2011-07-10 17:35                     ` Paul E. McKenney
2011-07-10 20:30                       ` julie Sullivan
2011-07-10 21:46                         ` Paul E. McKenney
2011-07-10 21:50                           ` julie Sullivan
2011-07-10 23:14                             ` Paul E. McKenney [this message]
2011-07-11 16:24                               ` Konrad Rzeszutek Wilk
2011-07-11 17:13                                 ` Paul E. McKenney
2011-07-11 19:30                                   ` Konrad Rzeszutek Wilk
2011-07-11 20:15                                     ` Paul E. McKenney
2011-07-11 21:09                                       ` Konrad Rzeszutek Wilk
2011-07-12 10:55                                         ` Paul E. McKenney
2011-07-12 14:12                                           ` Konrad Rzeszutek Wilk
2011-07-12 14:49                                             ` Paul E. McKenney
2011-07-12 15:07                                               ` Paul E. McKenney
2011-07-12 15:15                                               ` Paul E. McKenney
2011-07-12 15:22                                                 ` Paul E. McKenney
2011-07-12 16:32                                                   ` PROBLEM: 3.0-rc kernels unbootable since -rc3 - under Xen, 32-bit guest only Konrad Rzeszutek Wilk
2011-07-12 16:46                                                     ` Paul E. McKenney
2011-07-12 16:03                                               ` PROBLEM: 3.0-rc kernels unbootable since -rc3 Konrad Rzeszutek Wilk
2011-07-12 16:39                                                 ` Paul E. McKenney
2011-07-12 18:01                                                   ` Konrad Rzeszutek Wilk
2011-07-12 18:59                                                     ` Paul E. McKenney
2011-07-12 19:07                                                       ` Konrad Rzeszutek Wilk
2011-07-12 20:52                                                         ` Paul E. McKenney
2011-07-12 19:10                                                       ` Peter Zijlstra
2011-07-12 19:57                                                         ` Konrad Rzeszutek Wilk
2011-07-12 20:46                                                           ` Paul E. McKenney
2011-07-12 21:04                                                             ` Julie Sullivan
2011-07-12 21:07                                                               ` Paul E. McKenney
2011-07-12 20:05                                                         ` Paul E. McKenney
2011-07-12  6:33                                     ` [Xen-devel] " Sander Eikelenboom
2011-07-12 14:05                                       ` Paul E. McKenney
     [not found]                               ` <CAAVPGOMSprJSkzziH6hJv9PweOONzsMaRZEK2ZSrV3xFBReTPw@mail.gmail.com>
     [not found]                                 ` <20110711214301.GP2245@linux.vnet.ibm.com>
2011-07-12 21:15                                   ` Julie Sullivan
2011-07-12 21:29                                     ` Paul E. McKenney
2011-07-12 21:35                                       ` Julie Sullivan
2011-07-12 21:49                                       ` Julie Sullivan
2011-07-12 22:00                                         ` Paul E. McKenney
2011-07-13  7:18                                           ` RKK
2011-07-13 15:47                                             ` Paul E. McKenney
2011-07-13 20:57                                           ` Julie Sullivan
2011-07-13 21:23                                             ` Paul E. McKenney
2011-07-07 17:28 ` julie Sullivan

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=20110710231449.GQ6014@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=kernelmail.jms@gmail.com \
    --cc=linux-kernel@vger.kernel.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