diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-06-21 14:26:42 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-07-02 15:34:25 -0400 |
commit | cf01537ecf192d9ff15c32a355db5d5af22bea4d (patch) | |
tree | 5561d7852d1a4dc88d706863f6c95256c783e9f4 | |
parent | 95f0c1de3e6ed4383cc4b5f52ce4ecfb21026b49 (diff) |
rcu: Add check for CPUs going offline with callbacks queued
If a CPU goes offline with callbacks queued, those callbacks might be
indefinitely postponed, which can result in a system hang. This commit
therefore inserts warnings for this condition.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r-- | kernel/rcutree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index e000a623e635..95c7b61e77e4 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -1509,6 +1509,9 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) | |||
1509 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 1509 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
1510 | if (need_report & RCU_OFL_TASKS_EXP_GP) | 1510 | if (need_report & RCU_OFL_TASKS_EXP_GP) |
1511 | rcu_report_exp_rnp(rsp, rnp, true); | 1511 | rcu_report_exp_rnp(rsp, rnp, true); |
1512 | WARN_ONCE(rdp->qlen != 0 || rdp->nxtlist != NULL, | ||
1513 | "rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, nxtlist=%p\n", | ||
1514 | cpu, rdp->qlen, rdp->nxtlist); | ||
1512 | } | 1515 | } |
1513 | 1516 | ||
1514 | #else /* #ifdef CONFIG_HOTPLUG_CPU */ | 1517 | #else /* #ifdef CONFIG_HOTPLUG_CPU */ |