mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
fdbb9b315c
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> |
||
---|---|---|
.. | ||
Makefile | ||
rcu.h | ||
rcuperf.c | ||
rcutorture.c | ||
srcu.c | ||
sync.c | ||
tiny_plugin.h | ||
tiny.c | ||
tree_exp.h | ||
tree_plugin.h | ||
tree_trace.c | ||
tree.c | ||
tree.h | ||
update.c |