rcu: Make rcu_future_needs_gp() check all ->need_future_gps[] elements
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 18 Apr 2018 21:14:42 +0000 (14:14 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:29:41 +0000 (10:29 -0700)
commit0ae94e00ce40e4447080ab7675220f725c690330
treed5c003296ddde1203898a0cb56665c5a2abeb49e
parent51af970d19f395fc57b82514022126de6c5420cd
rcu: Make rcu_future_needs_gp() check all ->need_future_gps[] elements

Currently, the rcu_future_needs_gp() function checks only the current
element of the ->need_future_gps[] array, which might miss elements that
were offset from the expected element, for example, due to races with
the start or the end of a grace period.  This commit therefore makes
rcu_future_needs_gp() use the need_any_future_gp() macro to check all
of the elements of this array.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Nicholas Piggin <npiggin@gmail.com>
kernel/rcu/tree.c
kernel/rcu/tree.h