[<prev] [next>] [day] [month] [year] [list]
Message-ID: <158504139960.28353.10219398307584932917.tip-bot2@tip-bot2>
Date: Tue, 24 Mar 2020 09:16:39 -0000
From: "tip-bot2 for Jules Irenge" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jules Irenge <jbi.octave@...il.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
"Joel Fernandes (Google)" <joel@...lfernandes.org>,
x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/rcu] rcu: Add missing annotation for exit_tasks_rcu_finish()
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: 90ba11ba99e0a4cc75302335d10a225b27a44918
Gitweb: https://git.kernel.org/tip/90ba11ba99e0a4cc75302335d10a225b27a44918
Author: Jules Irenge <jbi.octave@...il.com>
AuthorDate: Mon, 20 Jan 2020 22:41:54
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Thu, 20 Feb 2020 16:00:45 -08:00
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@...il.com>
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
Reviewed-by: Joel Fernandes (Google) <joel@...lfernandes.org>
---
kernel/rcu/update.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index a04fe54..ede656c 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);
Powered by blists - more mailing lists