From: Thierry Reding <thierry.reding@kernel.org>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Lee Jones <lee@kernel.org>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Rosen Penev <rosenp@gmail.com>,
linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 02/10] clk: tegra: bpmp: Drop manual clock unregister on provider failure
Date: Fri, 4 Dec 2026 22:35:11 +0100 [thread overview]
Message-ID: <axMx__RDiBnn0QGB@orome> (raw)
In-Reply-To: <179639463448.3916230.786064231456402771.b4-reply@b4>
[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]
On Fri, Dec 04, 2026 at 03:30:34PM +0100, Jerome Brunet wrote:
> On 2026-12-04 13:41 +0100, Thierry Reding wrote:
> > On Fri, Nov 27, 2026 at 07:25:26PM +0000, Lee Jones wrote:
> > > tegra_bpmp_clk_register() registers every clock with
> > > devm_clk_hw_register(), and tegra_bpmp_register_clocks_one() records
> > > ERR_PTR values in bpmp->clocks[i] whenever an individual clock fails to
> > > register. If of_clk_add_hw_provider() fails,
> > > tegra_bpmp_unregister_clocks() unconditionally dereferences
> > > bpmp->clocks[i] and calls clk_hw_unregister(), crashing on any error
> > > pointer and double-unregistering clocks when devres subsequently unwinds
> > > on probe failure.
> > >
> > > Remove tegra_bpmp_unregister_clocks() and rely on devres to unregister
> > > the clocks cleanly.
> > >
> > > Fixes: ca6f2796eef7 ("clk: tegra: Add BPMP clock driver")
> >
> > Not sure it's really worth porting this back to 10 years worth of stable
> > trees since there's not been a single report of this ever happening. But
> > it's also not a very big patch, so might as well leave it here.
> >
> > Brian, do you want me to take this via the Tegra tree? I already have
> > that "clk: tegra: bpmp: Do not cache the EMC clock rate" patch in that
> > tree, and while I don't think it's going to cause any conflicts, seems
> > reasonable to keep them all together.
>
> Hi Thierry,
>
> I already applied it. Send what you have. I'd deal with the conflict if
> there is one.
No problem, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-12-04 21:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 19:25 [PATCH 00/10] clk: Fix OOB writes, UAFs, ERR_PTR dereferences, and rate-calc bugs (batch 2) Lee Jones
2026-11-27 19:25 ` Lee Jones
2026-11-27 19:25 ` [PATCH 01/10] clk: ti: fapll: Fix output clock array allocation and bounds check Lee Jones
2026-11-27 19:36 ` sashiko-bot
2026-11-27 19:25 ` [PATCH 02/10] clk: tegra: bpmp: Drop manual clock unregister on provider failure Lee Jones
2026-11-27 19:36 ` sashiko-bot
2026-12-04 12:41 ` Thierry Reding
2026-12-04 14:30 ` Jerome Brunet
2026-12-04 21:35 ` Thierry Reding [this message]
2026-11-27 19:25 ` [PATCH 03/10] clk: starfive: jh7110-sys: Use devres for PLL0 clock and notifier Lee Jones
2026-11-27 19:25 ` [PATCH 04/10] clk: starfive: jh7110: Duplicate top clock bulk arrays per device Lee Jones
2026-11-27 19:25 ` [PATCH 05/10] clk: rockchip: cpu: Allocate rate_table before registering notifier Lee Jones
2026-11-27 19:25 ` Lee Jones
2026-11-27 19:33 ` sashiko-bot
2026-11-29 16:42 ` Heiko Stuebner
2026-11-29 16:42 ` Heiko Stuebner
2026-11-30 14:51 ` Lee Jones
2026-11-30 14:51 ` Lee Jones
2026-12-02 19:03 ` Jerome Brunet
2026-12-02 19:03 ` Jerome Brunet
2026-12-02 19:52 ` Lee Jones
2026-12-02 19:52 ` Lee Jones
2026-12-04 10:14 ` Heiko Stübner
2026-12-04 10:14 ` Heiko Stübner
2026-12-04 10:15 ` Heiko Stübner
2026-12-04 10:15 ` Heiko Stübner
2026-11-27 19:25 ` [PATCH 06/10] clk: tegra: bpmp: Skip ERR_PTR entries in tegra_bpmp_clk_of_xlate() Lee Jones
2026-11-27 19:25 ` [PATCH 07/10] clk: rp1: Propagate determine_rate() return value for PLL dividers Lee Jones
2026-11-27 19:25 ` [PATCH 08/10] clk: rp1: Reference secondary PLL divider clk_hw in parent tables Lee Jones
2026-11-27 19:25 ` [PATCH 09/10] clk: keystone: sci-clk: Check allocation failure before copying clock array Lee Jones
2026-12-03 16:21 ` Andrew Davis
2026-12-03 18:24 ` Jerome Brunet
2026-12-03 22:57 ` Andrew Davis
2026-11-27 19:25 ` [PATCH 10/10] clk: versatile: icst: Check kasprintf() and put parent node on error Lee Jones
2026-12-04 9:24 ` (subset) [PATCH 00/10] clk: Fix OOB writes, UAFs, ERR_PTR dereferences, and rate-calc bugs (batch 2) Jerome Brunet
2026-12-04 9:24 ` Jerome Brunet
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=axMx__RDiBnn0QGB@orome \
--to=thierry.reding@kernel.org \
--cc=bmasney+clk@redhat.com \
--cc=jbrunet+clk@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=jonathanh@nvidia.com \
--cc=lee@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pgaikwad@nvidia.com \
--cc=rosenp@gmail.com \
--cc=sboyd@kernel.org \
--cc=stable@vger.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 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.