From: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
To: "Uladzislau Rezki (Sony)" <urezki@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>
Cc: "Paul E . McKenney" <paulmck@kernel.org>,
RCU <rcu@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>,
Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH v2 1/2] rcuscale: Do a proper cleanup if kfree_scale_init() fails
Date: Wed, 13 Nov 2024 22:30:28 +0530 [thread overview]
Message-ID: <6f362a9d-a87e-4061-bf41-14810e432333@amd.com> (raw)
In-Reply-To: <20241113110009.65256-1-urezki@gmail.com>
On 11/13/2024 4:30 PM, Uladzislau Rezki (Sony) wrote:
> A static analyzer for C, Smatch, reports and triggers below
> warnings:
>
> kernel/rcu/rcuscale.c:1215 rcu_scale_init()
> warn: inconsistent returns 'global &fullstop_mutex'.
>
> The checker complains about, we do not unlock the "fullstop_mutex"
> mutex, in case of hitting below error path:
>
> <snip>
> ...
> if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) {
> pr_alert("ERROR: call_rcu() CBs are not being lazy as expected!\n");
> WARN_ON_ONCE(1);
> return -1;
> ^^^^^^^^^^
> ...
> <snip>
>
> it happens because "-1" is returned right away instead of
> doing a proper unwinding.
>
> Fix it by jumping to "unwind" label instead of returning -1.
>
> Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/rcu/ZxfTrHuEGtgnOYWp@pc636/T/
> Fixes: 084e04fff160 ("rcuscale: Add laziness and kfree tests")
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
- Neeraj
prev parent reply other threads:[~2024-11-13 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 11:00 Uladzislau Rezki (Sony)
2024-11-13 11:00 ` [PATCH v2 2/2] rcuscale: Remove redundant WARN_ON_ONCE() splat Uladzislau Rezki (Sony)
2024-11-13 17:00 ` Neeraj Upadhyay
2024-11-13 17:00 ` Neeraj Upadhyay [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=6f362a9d-a87e-4061-bf41-14810e432333@amd.com \
--to=neeraj.upadhyay@amd.com \
--cc=boqun.feng@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksiy.avramchenko@sony.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=urezki@gmail.com \
/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
all inboxes | Powered by JetHome®