Skip to content

Commit 6d60ea0

Browse files
qiangzh3paulmckrcu
authored andcommitted
rcu: Fix rcu_read_unlock_strict() strict QS reporting
Kernels built with CONFIG_PREEMPT=n and CONFIG_RCU_STRICT_GRACE_PERIOD=y report the quiescent state directly from the outermost rcu_read_unlock(). However, the current CPU's rcu_data structure's ->cpu_no_qs.b.norm might still be set, in which case rcu_report_qs_rdp() will exit early, thus failing to report quiescent state. This commit therefore causes rcu_read_unlock_strict() to clear CPU's rcu_data structure's ->cpu_no_qs.b.norm field before invoking rcu_report_qs_rdp(). Signed-off-by: Zqiang <qiang1.zhang@intel.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 568035b commit 6d60ea0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/rcu/tree_plugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,7 @@ void rcu_read_unlock_strict(void)
824824
if (irqs_disabled() || preempt_count() || !rcu_state.gp_kthread)
825825
return;
826826
rdp = this_cpu_ptr(&rcu_data);
827+
rdp->cpu_no_qs.b.norm = false;
827828
rcu_report_qs_rdp(rdp);
828829
udelay(rcu_unlock_delay);
829830
}

0 commit comments

Comments
 (0)