diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2024-10-25 17:44:28 -0700 |
---|---|---|
committer | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2024-12-14 17:10:29 +0100 |
commit | ecc5e6b0d3c982091b82615af21817ddf9cfdd60 (patch) | |
tree | d2e086b1150df992b80eb12312f69b357eb63a18 /kernel/rcu/tree_plugin.h | |
parent | 7a323371197b184c8f0cff0d67d74f48f0098164 (diff) |
rcu: Add KCSAN exclusive-writer assertions for rdp->cpu_no_qs.b.exp
The value of rdp->cpu_no_qs.b.exp may be changed only by the corresponding
CPU, and that CPU is not even allowed to race with itself, for example,
via interrupt handlers. This commit therefore adds KCSAN exclusive-writer
assertions to check this constraint.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 3927ea5f7955..bb7ca6eb9ef0 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -275,6 +275,7 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp) rcu_report_exp_rdp(rdp); else WARN_ON_ONCE(rdp->cpu_no_qs.b.exp); + ASSERT_EXCLUSIVE_WRITER_SCOPED(rdp->cpu_no_qs.b.exp); } /* |