diff options
author | Jules Irenge <jbi.octave@gmail.com> | 2020-01-20 23:41:54 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-02-21 01:00:45 +0100 |
commit | 90ba11ba99e0a4cc75302335d10a225b27a44918 (patch) | |
tree | 47da5f48c2717088a071889d9ebddc57141d6a34 | |
parent | rcu: Add missing annotation for exit_tasks_rcu_start() (diff) | |
download | linux-90ba11ba99e0a4cc75302335d10a225b27a44918.tar.xz linux-90ba11ba99e0a4cc75302335d10a225b27a44918.zip |
rcu: Add missing annotation for exit_tasks_rcu_finish()
Sparse reports a warning at exit_tasks_rcu_finish(void)
|warning: context imbalance in exit_tasks_rcu_finish()
|- wrong count at exit
To fix this, this commit adds a __releases(&tasks_rcu_exit_srcu).
Given that exit_tasks_rcu_finish() 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>
-rw-r--r-- | kernel/rcu/update.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index a04fe54bc4ab..ede656c5e1e9 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -809,7 +809,7 @@ void exit_tasks_rcu_start(void) __acquires(&tasks_rcu_exit_srcu) } /* Do the srcu_read_unlock() for the above synchronize_srcu(). */ -void exit_tasks_rcu_finish(void) +void exit_tasks_rcu_finish(void) __releases(&tasks_rcu_exit_srcu) { preempt_disable(); __srcu_read_unlock(&tasks_rcu_exit_srcu, current->rcu_tasks_idx); |