summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2024-02-22 12:29:54 -0800
committerBoqun Feng <boqun.feng@gmail.com>2024-02-25 14:21:34 -0800
commit30ef09635b9ed3ebca4f677495332a2e444a5cda (patch)
tree766f658e1614fd2e0687858eb50522dcb0aba8cc /kernel/rcu/tree.c
parentbfe93930ea1ea3c6c115a7d44af6e4fea609067e (diff)
downloadlinux-30ef09635b9ed3ebca4f677495332a2e444a5cda.tar.gz
linux-30ef09635b9ed3ebca4f677495332a2e444a5cda.tar.bz2
linux-30ef09635b9ed3ebca4f677495332a2e444a5cda.zip
rcu-tasks: Initialize callback lists at rcu_init() time
In order for RCU Tasks to reliably maintain per-CPU lists of exiting tasks, those lists must be initialized before it is possible for tasks to exit, especially given that the boot CPU is not necessarily CPU 0 (an example being, powerpc kexec() kernels). And at the time that rcu_init_tasks_generic() is called, a task could potentially exit, unconventional though that sort of thing might be. This commit therefore moves the calls to cblist_init_generic() from functions called from rcu_init_tasks_generic() to a new function named tasks_cblist_init_generic() that is invoked from rcu_init(). This constituted a bug in a commit that never went to mainline, so there is no need for any backporting to -stable. Reported-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index b2bccfd37c38..ba9137f39d14 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -5165,6 +5165,8 @@ void __init rcu_init(void)
(void)start_poll_synchronize_rcu_expedited();
rcu_test_sync_prims();
+
+ tasks_cblist_init_generic();
}
#include "tree_stall.h"