summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-05-09 17:45:12 +0200
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-07-02 21:34:21 +0200
commit285fe29481d865ae381ad3924c80894e6968c2d8 (patch)
treee01e809f4c840770698f857e8176ebb083ff9ad8 /kernel/rcutree.c
parentRevert "rcu: Move PREEMPT_RCU preemption to switch_to() invocation" (diff)
downloadlinux-285fe29481d865ae381ad3924c80894e6968c2d8.tar.xz
linux-285fe29481d865ae381ad3924c80894e6968c2d8.zip
rcu: Fix detection of abruptly-ending stall
The code that attempts to identify stalls that end just as we detect them is broken by both flavors of initialization failure. This commit therefore properly initializes and computes the count of the number of reasons why the RCU grace period is stalled. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 4b97bba7396e..dc8c5284fe06 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -733,7 +733,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
int cpu;
long delta;
unsigned long flags;
- int ndetected;
+ int ndetected = 0;
struct rcu_node *rnp = rcu_get_root(rsp);
/* Only let one CPU complain about others per time interval. */
@@ -774,7 +774,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
*/
rnp = rcu_get_root(rsp);
raw_spin_lock_irqsave(&rnp->lock, flags);
- ndetected = rcu_print_task_stall(rnp);
+ ndetected += rcu_print_task_stall(rnp);
raw_spin_unlock_irqrestore(&rnp->lock, flags);
print_cpu_stall_info_end();