rcu: Correctly unlock root node in rcu_check_gp_start_stall()
authorNeeraj Upadhyay <neeraju@codeaurora.org>
Fri, 29 Mar 2019 11:27:08 +0000 (16:57 +0530)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 28 May 2019 16:02:57 +0000 (09:02 -0700)
commit3ae976a7e3e87438b8439a01aeb79d4866b1c444
tree3909fa53f6a8ea05abfd45fdbeab0423ab62523f
parentcd6d17b4a4646d4bf2568f3a4de13a5a13e2ed28
rcu: Correctly unlock root node in rcu_check_gp_start_stall()

On systems whose rcu_node tree has only one node, the
rcu_check_gp_start_stall() function's values of rnp and rnp_root will
be identical.  In this case, it clearly does not make sense to release
both rnp->lock and rnp_root->lock, but that is exactly what this function
does in the last early exit.  This commit therefore unlocks only rnp->lock
when rnp and rnp_root are equal.

Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
kernel/rcu/tree_stall.h