Skip to content

Commit 2d7f00b

Browse files
committed
rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()
The normal grace period's RCU CPU stall warnings are invoked from the scheduling-clock interrupt handler, and can thus invoke smp_processor_id() with impunity, which allows them to directly invoke dump_cpu_task(). In contrast, the expedited grace period's RCU CPU stall warnings are invoked from process context, which causes the dump_cpu_task() function's calls to smp_processor_id() to complain bitterly in debug kernels. This commit therefore causes synchronize_rcu_expedited_wait() to disable preemption around its call to dump_cpu_task(). Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 0cae5de commit 2d7f00b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/rcu/tree_exp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ static void synchronize_rcu_expedited_wait(void)
667667
mask = leaf_node_cpu_bit(rnp, cpu);
668668
if (!(READ_ONCE(rnp->expmask) & mask))
669669
continue;
670+
preempt_disable(); // For smp_processor_id() in dump_cpu_task().
670671
dump_cpu_task(cpu);
672+
preempt_enable();
671673
}
672674
}
673675
jiffies_stall = 3 * rcu_exp_jiffies_till_stall_check() + 3;

0 commit comments

Comments
 (0)