Skip to content

Commit 90ba11b

Browse files
irengepaulmckrcu
authored andcommitted
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 <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Joel Fernandes (Google) <[email protected]>
1 parent e1e9bdc commit 90ba11b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/update.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ void exit_tasks_rcu_start(void) __acquires(&tasks_rcu_exit_srcu)
809809
}
810810

811811
/* Do the srcu_read_unlock() for the above synchronize_srcu(). */
812-
void exit_tasks_rcu_finish(void)
812+
void exit_tasks_rcu_finish(void) __releases(&tasks_rcu_exit_srcu)
813813
{
814814
preempt_disable();
815815
__srcu_read_unlock(&tasks_rcu_exit_srcu, current->rcu_tasks_idx);

0 commit comments

Comments
 (0)