summaryrefslogtreecommitdiff
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2016-12-20 18:17:58 +0300
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-01-23 22:37:13 +0300
commitfdbb9b315ce40922f3a8d2b8352776d7bc963d84 (patch)
tree47e1d70175d586c4c0d35e79f9aa6b6ce11615b7 /lib/Kconfig.debug
parent09e2db37ec6d22bc27e2ba94ab4889541567f52e (diff)
downloadlinux-fdbb9b315ce40922f3a8d2b8352776d7bc963d84.tar.xz
rcu: Make rcu_cpu_starting() use its "cpu" argument
The rcu_cpu_starting() function uses this_cpu_ptr() to locate the incoming CPU's rcu_data structure. This works for the boot CPU and for all CPUs onlined after rcu_init() executes (during very early boot). Currently, this is the full set of CPUs, so all is well. But if anyone ever parallelizes boot before rcu_init() time, it will fail. This commit therefore substitutes the rcu_cpu_starting() function's this_cpu_pointer() for per_cpu_ptr(), future-proofing the code and (arguably) improving readability. This commit inadvertently fixes a latent bug: If there ever had been more than just the boot CPU online at rcu_init() time, the old code would not initialize the non-boot CPUs, but rather would repeatedly initialize the boot CPU. Reported-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'lib/Kconfig.debug')
0 files changed, 0 insertions, 0 deletions