rcu: Make preemptible rcu_exp_handler() check idempotency
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 26 Oct 2024 00:17:16 +0000 (17:17 -0700)
committerUladzislau Rezki (Sony) <urezki@gmail.com>
Sat, 14 Dec 2024 16:10:20 +0000 (17:10 +0100)
commit7a323371197b184c8f0cff0d67d74f48f0098164
treefc6c210bbebf397a75c017c9892e864d63f846e2
parent6ae4c30fee05d97c4f53237e3cd13795a6f44422
rcu: Make preemptible rcu_exp_handler() check idempotency

Although the non-preemptible implementation of rcu_exp_handler()
contains checks to enforce idempotency, the preemptible version does not.
The reason for this omission is that in preemptible kernels, there is
no reporting of quiescent states from CPU hotplug notifiers, and thus
no need for idempotency.

In theory, anyway.

In practice, accidents happen.  This commit therefore adds checks under
WARN_ON_ONCE() to catch any such accidents.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
kernel/rcu/tree_exp.h