Skip to content

Commit 049dfe9

Browse files
Frederic Weisbeckerurezki
authored andcommitted
rcu: Report callbacks enqueued on offline CPU blind spot
Callbacks enqueued after rcutree_report_cpu_dead() fall into RCU barrier blind spot. Report any potential misuse. Reported-by: Paul E. McKenney <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
1 parent fac04ef commit 049dfe9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/rcu/tree.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,8 +3084,11 @@ __call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy_in)
30843084
head->func = func;
30853085
head->next = NULL;
30863086
kasan_record_aux_stack_noalloc(head);
3087+
30873088
local_irq_save(flags);
30883089
rdp = this_cpu_ptr(&rcu_data);
3090+
RCU_LOCKDEP_WARN(!rcu_rdp_cpu_online(rdp), "Callback enqueued on offline CPU!");
3091+
30893092
lazy = lazy_in && !rcu_async_should_hurry();
30903093

30913094
/* Add the callback to our list. */

0 commit comments

Comments
 (0)