From: Joel Fernandes <joel@joelfernandes.org>
To: paulmck@kernel.org
Cc: rcu@vger.kernel.org, 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, Jules Irenge <jbi.octave@gmail.com>
Subject: Re: [PATCH tip/core/rcu 2/3] rcu: Add missing annotation for exit_tasks_rcu_start()
Date: Mon, 17 Feb 2020 09:44:52 -0500 [thread overview]
Message-ID: <20200217144452.GA145700@google.com> (raw)
In-Reply-To: <20200215002520.15746-2-paulmck@kernel.org>
On Fri, Feb 14, 2020 at 04:25:19PM -0800, paulmck@kernel.org wrote:
> From: Jules Irenge <jbi.octave@gmail.com>
>
> 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.
For patch 1/3 and 2/3:
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Though IMO it would be good to squash both the patches.
thanks,
- Joel
> 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 a27df76..a04fe54 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);
> --
> 2.9.5
>
next prev parent reply other threads:[~2020-02-17 14:44 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 [this message]
2020-02-17 23:10 ` Paul E. McKenney
2020-02-15 0:25 ` [PATCH tip/core/rcu 3/3] rcu: Add missing annotation for exit_tasks_rcu_finish() paulmck
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=20200217144452.GA145700@google.com \
--to=joel@joelfernandes.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=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=paulmck@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.