rcu: Suppress false-positive offline-CPU lockdep-RCU splat
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:14:34 +0000 (10:14 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Jul 2018 22:39:02 +0000 (15:39 -0700)
commit5554788e1d4253a92b794a9006b7ae2c10be52af
tree854397c8697d9bbf49b789c3177db10dfae498bd
parent928164351e700f91ab588f20fe470cac9db477a9
rcu: Suppress false-positive offline-CPU lockdep-RCU splat

The rcu_lockdep_current_cpu_online() function currently checks only the
RCU-sched data structures to determine whether or not RCU believes that a
given CPU is offline.  Unfortunately, there are multiple flavors of RCU,
which means that there is a short window of time during which the various
flavors disagree as to whether or not a given CPU is offline.  This can
result in false-positive lockdep-RCU splats in which some other flavor
of RCU tries to do something based on its view that the CPU is online,
only to get hit with a lockdep-RCU splat because RCU-sched instead
believes that the CPU is offline.

This commit therefore changes rcu_lockdep_current_cpu_online() to scan
all RCU flavors and to consider a given CPU to be online if any of the
RCU flavors believe it to be online, thus preventing these false-positive
splats.

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