Skip to content
Commit 82dd8419 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu: Warn on for_each_leaf_node_cpu_mask() from non-leaf



The for_each_leaf_node_cpu_mask() and for_each_leaf_node_possible_cpu()
macros must be invoked only on leaf rcu_node structures.  Failing to
abide by this restriction can result in infinite loops on systems with
more than 64 CPUs (or for more than 32 CPUs on 32-bit systems).  This
commit therefore adds WARN_ON_ONCE() calls to make misuse of these two
macros easier to debug.

Reported-by: default avatarQian Cai <cai@lca.pw>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 9f01eb5d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment