rcu: Make rcu_start_this_gp() check for out-of-range requests
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 19 Apr 2018 19:23:34 +0000 (12:23 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:30:48 +0000 (10:30 -0700)
commit665f08f1ce9cf608a9435e11d66f55be4e72540a
treea5f0c6e8d759ada2ed304bca07ae3fa49bc00995
parent360e0da67eab610b0efd53cbab3e1535095e7aa4
rcu: Make rcu_start_this_gp() check for out-of-range requests

If rcu_start_this_gp() is invoked with a requested grace period more
than three in the future, then either the ->need_future_gp[] array
needs to be bigger or the caller needs to be repaired.  This commit
therefore adds a WARN_ON_ONCE() checking for this condition.

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