summaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorJules Irenge <jbi.octave@gmail.com>2020-01-20 22:41:26 +0000
committerPaul E. McKenney <paulmck@kernel.org>2020-02-20 16:00:45 -0800
commite1e9bdc00ade6651c11bf5628ee9d313ee6089ac (patch)
treebe050164c819df4c1f6bd21168ed179a8b6b0838 /kernel/rcu
parentfcb7381265e6cceb1d54283878d145db52b9d9d7 (diff)
downloadlinux-e1e9bdc00ade6651c11bf5628ee9d313ee6089ac.tar.bz2
rcu: Add missing annotation for exit_tasks_rcu_start()
Sparse reports a warning at exit_tasks_rcu_start(void) |warning: context imbalance in exit_tasks_rcu_start() - wrong count at exit To fix this, this commit adds an __acquires(&tasks_rcu_exit_srcu). Given that exit_tasks_rcu_start() does actually call __srcu_read_lock(), this not only fixes the warning but also improves on the readability of the code. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index a27df761b149..a04fe54bc4ab 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -801,7 +801,7 @@ static int __init rcu_spawn_tasks_kthread(void)
core_initcall(rcu_spawn_tasks_kthread);
/* Do the srcu_read_lock() for the above synchronize_srcu(). */
-void exit_tasks_rcu_start(void)
+void exit_tasks_rcu_start(void) __acquires(&tasks_rcu_exit_srcu)
{
preempt_disable();
current->rcu_tasks_idx = __srcu_read_lock(&tasks_rcu_exit_srcu);