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: Thu, 24 Sep 2026 19:09:33 -0700 [thread overview]
Message-ID: <arXX3RkaFvEwTySN@thelio> (raw)
In-Reply-To: <20260924-atlantis_gate_shared_enable_fix-v1-1-303f925b8a3d@oss.tenstorrent.com>
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.
Thanks,
Drew
prev parent reply other threads:[~2026-09-25 2:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 15:31 Anirudh Srinivasan
2026-09-25 2:09 ` 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=arXX3RkaFvEwTySN@thelio \
--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®