From: "Paul E. McKenney" <paulmck@kernel.org>
To: Jules Irenge <jbi.octave@gmail.com>
Cc: rcu@vger.kernel.org, joel@joelfernandes.org,
jiangshanlai@gmail.com, mathieu.desnoyers@efficios.com,
rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu: Add missing __releases() annotation
Date: Thu, 29 Apr 2021 11:39:59 -0700 [thread overview]
Message-ID: <20210429183959.GY975577@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <20210428231219.48109-1-jbi.octave@gmail.com>
On Thu, Apr 29, 2021 at 12:12:19AM +0100, Jules Irenge wrote:
> Sparse report a warning at rcu_print_task_stall()
>
> "warning: context imbalance in rcu_print_task_stall - unexpected unlock"
>
> The root cause is a missing annotation at rcu_print_task_stall() function
>
> Add the missing __releases(rnp->lock) annotation
>
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Good catch, applied, thank you!
Thanx, Paul
> ---
> kernel/rcu/tree_stall.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
> index 59b95cc5cbdf..18b2d5274d65 100644
> --- a/kernel/rcu/tree_stall.h
> +++ b/kernel/rcu/tree_stall.h
> @@ -314,6 +314,7 @@ static void rcu_print_detail_task_stall_rnp(struct rcu_node *rnp)
> * tasks blocked within RCU read-side critical sections.
> */
> static int rcu_print_task_stall(struct rcu_node *rnp, unsigned long flags)
> + __releases(rnp->lock)
> {
> raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
> return 0;
> --
> 2.31.1
>
prev parent reply other threads:[~2021-04-29 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 23:12 [PATCH] rcu: Add missing __releases() annotation Jules Irenge
2021-04-29 18:39 ` Paul E. McKenney [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=20210429183959.GY975577@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=jbi.octave@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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).