aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2016-12-20 07:17:58 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-01-23 11:37:13 -0800
commitfdbb9b315ce40922f3a8d2b8352776d7bc963d84 (patch)
tree47e1d70175d586c4c0d35e79f9aa6b6ce11615b7 /lib/Kconfig.debug
parentrcu: Add comment headers to expedited-grace-period counter functions (diff)
downloadwireguard-linux-fdbb9b315ce40922f3a8d2b8352776d7bc963d84.tar.xz
wireguard-linux-fdbb9b315ce40922f3a8d2b8352776d7bc963d84.zip
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