Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

Pull RCU fix from Paul McKenney:
"This is a fix for a regression in the v5.10 merge window, but it was
reported quite late in the v5.10 process, plus generating and testing
the fix took some time.

The regression is due to commit 36dadef23fcc ("kprobes: Init kprobes
in early_initcall") which on powerpc can use RCU Tasks before
initialization, resulting in boot failures.

The fix is straightforward, simply moving initialization of RCU Tasks
before the early_initcall()s. The fix has been exposed to -next and
kbuild test robot testing, and has been tested by the PowerPC guys"

* 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
rcu-tasks: Move RCU-tasks initialization to before early_initcall()

+28 -4
+6
include/linux/rcupdate.h
··· 86 86 void rcu_report_dead(unsigned int cpu); 87 87 void rcutree_migrate_callbacks(int cpu); 88 88 89 + #ifdef CONFIG_TASKS_RCU_GENERIC 90 + void rcu_init_tasks_generic(void); 91 + #else 92 + static inline void rcu_init_tasks_generic(void) { } 93 + #endif 94 + 89 95 #ifdef CONFIG_RCU_STALL_COMMON 90 96 void rcu_sysrq_start(void); 91 97 void rcu_sysrq_end(void);
+1
init/main.c
··· 1518 1518 1519 1519 init_mm_internals(); 1520 1520 1521 + rcu_init_tasks_generic(); 1521 1522 do_pre_smp_initcalls(); 1522 1523 lockup_detector_init(); 1523 1524
+21 -4
kernel/rcu/tasks.h
··· 241 241 } 242 242 } 243 243 244 - /* Spawn RCU-tasks grace-period kthread, e.g., at core_initcall() time. */ 244 + /* Spawn RCU-tasks grace-period kthread. */ 245 245 static void __init rcu_spawn_tasks_kthread_generic(struct rcu_tasks *rtp) 246 246 { 247 247 struct task_struct *t; ··· 564 564 rcu_spawn_tasks_kthread_generic(&rcu_tasks); 565 565 return 0; 566 566 } 567 - core_initcall(rcu_spawn_tasks_kthread); 568 567 569 568 #if !defined(CONFIG_TINY_RCU) 570 569 void show_rcu_tasks_classic_gp_kthread(void) ··· 691 692 rcu_spawn_tasks_kthread_generic(&rcu_tasks_rude); 692 693 return 0; 693 694 } 694 - core_initcall(rcu_spawn_tasks_rude_kthread); 695 695 696 696 #if !defined(CONFIG_TINY_RCU) 697 697 void show_rcu_tasks_rude_gp_kthread(void) ··· 966 968 static void rcu_tasks_trace_pertask(struct task_struct *t, 967 969 struct list_head *hop) 968 970 { 971 + // During early boot when there is only the one boot CPU, there 972 + // is no idle task for the other CPUs. Just return. 973 + if (unlikely(t == NULL)) 974 + return; 975 + 969 976 WRITE_ONCE(t->trc_reader_special.b.need_qs, false); 970 977 WRITE_ONCE(t->trc_reader_checked, false); 971 978 t->trc_ipi_to_cpu = -1; ··· 1196 1193 rcu_spawn_tasks_kthread_generic(&rcu_tasks_trace); 1197 1194 return 0; 1198 1195 } 1199 - core_initcall(rcu_spawn_tasks_trace_kthread); 1200 1196 1201 1197 #if !defined(CONFIG_TINY_RCU) 1202 1198 void show_rcu_tasks_trace_gp_kthread(void) ··· 1223 1221 show_rcu_tasks_trace_gp_kthread(); 1224 1222 } 1225 1223 #endif /* #ifndef CONFIG_TINY_RCU */ 1224 + 1225 + void __init rcu_init_tasks_generic(void) 1226 + { 1227 + #ifdef CONFIG_TASKS_RCU 1228 + rcu_spawn_tasks_kthread(); 1229 + #endif 1230 + 1231 + #ifdef CONFIG_TASKS_RUDE_RCU 1232 + rcu_spawn_tasks_rude_kthread(); 1233 + #endif 1234 + 1235 + #ifdef CONFIG_TASKS_TRACE_RCU 1236 + rcu_spawn_tasks_trace_kthread(); 1237 + #endif 1238 + } 1226 1239 1227 1240 #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */ 1228 1241 static inline void rcu_tasks_bootup_oddness(void) {}