Commit 285fe29481d865ae381ad3924c80894e6968c2d8

Authored by Paul E. McKenney
Committed by Paul E. McKenney
1 parent cba6d0d64e

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -733,7 +733,7 @@
733 733 int cpu;
734 734 long delta;
735 735 unsigned long flags;
736   - int ndetected;
  736 + int ndetected = 0;
737 737 struct rcu_node *rnp = rcu_get_root(rsp);
738 738  
739 739 /* Only let one CPU complain about others per time interval. */
... ... @@ -774,7 +774,7 @@
774 774 */
775 775 rnp = rcu_get_root(rsp);
776 776 raw_spin_lock_irqsave(&rnp->lock, flags);
777   - ndetected = rcu_print_task_stall(rnp);
  777 + ndetected += rcu_print_task_stall(rnp);
778 778 raw_spin_unlock_irqrestore(&rnp->lock, flags);
779 779  
780 780 print_cpu_stall_info_end();