From: Drew Fustini <fustini@kernel.org>
To: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
Cc: Drew Fustini <dfustini@oss.tenstorrent.com>,
Joel Stanley <jms@oss.tenstorrent.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Brian Masney <bmasney@redhat.com>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH] clk: tenstorrent: Fix refcount leak on shared gate clk enable failure
Date: Tue, 29 Sep 2026 12:56:45 -0700 [thread overview]
Message-ID: <arwX/SguNGK3FhFm@x1> (raw)
In-Reply-To: <arXX3RkaFvEwTySN@thelio>
On Thu, Sep 24, 2026 at 07:09:33PM -0700, Drew Fustini wrote:
> On Thu, Sep 24, 2026 at 10:31:51AM -0500, Anirudh Srinivasan wrote:
> > atlantis_clk_gate_shared_enable() increments the refcount for the number
> > of clks requesting the shared gate clk to be enabled always. It should
> > only do this when the enable for the gate took effect in hardware. It's
> > possible to end up in a situation where the gate enable failed, but the
> > refcount is incremented anyway, so subsequent requests by other clks
> > that share the same refcount get ignored and the gate enable is never
> > retried.
> >
> > Update this function so that the refcount is not incremented when the
> > gate clk enable fails in hardware.
> >
> > Reported-by: Sashiko <sashiko-bot@kernel.org>
> > Link: https://sashiko.dev/#/patchset/AS8P251MB00013BD9A093C06D2D60E10EC8B42%40AS8P251MB0001.EURP251.PROD.OUTLOOK.COM
> > Fixes: 23c8ebc95284 ("clk: tenstorrent: Add Atlantis clock controller driver")
> > Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
> > ---
> > drivers/clk/tenstorrent/atlantis-prcm.c | 19 +++++++++----------
> > 1 file changed, 9 insertions(+), 10 deletions(-)
>
> Reviewed-by: Drew Fustini (Tenstorrent) <fustini@kernel.org>
>
> I will apply this to tenstorrent-clk-for-next.
Applied to tenstorrent-clk-for-next:
3f0655b51eb0 clk: tenstorrent: Fix refcount leak on shared gate clk enable failure
Thanks,
Drew
prev parent reply other threads:[~2026-09-29 19:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 15:31 Anirudh Srinivasan
2026-09-25 2:09 ` Drew Fustini
2026-09-29 19:56 ` Drew Fustini [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=arwX/SguNGK3FhFm@x1 \
--to=fustini@kernel.org \
--cc=asrinivasan@oss.tenstorrent.com \
--cc=bmasney+clk@redhat.com \
--cc=bmasney@redhat.com \
--cc=dfustini@oss.tenstorrent.com \
--cc=jbrunet+clk@baylibre.com \
--cc=jms@oss.tenstorrent.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=sashiko-bot@kernel.org \
--cc=sboyd@kernel.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
all inboxes | Powered by JetHome®