From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
Jules Irenge <jbi.octave@gmail.com>,
"Paul E . McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 3/3] rcu: Add missing annotation for exit_tasks_rcu_finish()
Date: Fri, 14 Feb 2020 16:25:20 -0800 [thread overview]
Message-ID: <20200215002520.15746-3-paulmck@kernel.org> (raw)
In-Reply-To: <20200215002446.GA15663@paulmck-ThinkPad-P72>
From: Jules Irenge <jbi.octave@gmail.com>
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>
---
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);
--
2.9.5
prev parent reply other threads:[~2020-02-15 0:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 0:24 [PATCH tip/core/rcu 0/3] Tasks-RCU updates for v5.7 Paul E. McKenney
2020-02-15 0:25 ` [PATCH tip/core/rcu 1/3] rcu-tasks: *_ONCE() for rcu_tasks_cbs_head paulmck
2020-02-17 12:38 ` Peter Zijlstra
2020-02-17 18:16 ` Paul E. McKenney
2020-02-18 7:56 ` Peter Zijlstra
2020-02-18 16:27 ` Paul E. McKenney
2020-02-18 20:11 ` Peter Zijlstra
2020-02-18 20:22 ` Paul E. McKenney
2020-02-18 22:45 ` Steven Rostedt
2020-02-18 22:54 ` Paul E. McKenney
2020-02-18 23:13 ` Steven Rostedt
2020-02-18 23:54 ` Paul E. McKenney
2020-02-19 0:01 ` Joel Fernandes
2020-02-19 0:16 ` Paul E. McKenney
2020-02-19 1:13 ` Joel Fernandes
2020-02-19 1:48 ` Paul E. McKenney
2020-02-17 18:23 ` Joel Fernandes
2020-02-17 18:38 ` Marco Elver
2020-02-17 19:32 ` Joel Fernandes
2020-02-15 0:25 ` [PATCH tip/core/rcu 2/3] rcu: Add missing annotation for exit_tasks_rcu_start() paulmck
2020-02-17 14:44 ` Joel Fernandes
2020-02-17 23:10 ` Paul E. McKenney
2020-02-15 0:25 ` paulmck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200215002520.15746-3-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jbi.octave@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).