From: sashiko-bot@kernel.org
To: "Guangshuo Li" <liguangshuo@mail.sdu.edu.cn>
Cc: linux-clk@vger.kernel.org, imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH 2/2] clk: imxrt1050: Fix potential use-after-free on unbind
Date: Sat, 28 Nov 2026 09:53:39 +0000 [thread overview]
Message-ID: <sashiko-outbox-238614@kernel.org> (raw)
In-Reply-To: <20261128-f81b700d6c-u08-2@mail.sdu.edu.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] clk: imx: wrong Fixes tag in clk-imxrt1050 devm provider commit
--
commit d288c059b643f38eaba3a472f1197d1ef4bc1169
Author: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
> clk: imxrt1050: Fix potential use-after-free on unbind
>
> The OF clock provider retains the managed onecell data after the
> driver is unbound. Subsequent clock lookups can access freed memory.
>
> Manage the provider so it is removed before the onecell data is freed.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: 7154b046d8f3 ("clk: imx: Add initial support for i.MXRT1050 clock driver")
> Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
[Severity: Low]
In commit 7154b046d8f3 ("clk: imx: Add initial support for i.MXRT1050
clock driver"), clk_hw_data was allocated with unmanaged kzalloc().
Commit 1b280598ab3b ("clk: imx: clk-imxrt1050: fix memory leak in
imxrt1050_clocks_probe") converted clk_hw_data to devm_kzalloc() while
leaving of_clk_add_hw_provider() unmanaged, introducing the lifetime
mismatch on unbind.
Should the Fixes tag reference that commit instead?
Fixes: 1b280598ab3b ("clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261128-f81b700d6c-u08-0@mail.sdu.edu.cn?part=2
prev parent reply other threads:[~2026-11-28 9:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 9:45 [PATCH 0/2] clk: imx: Manage OF clock provider lifetimes Guangshuo Li
2026-11-28 9:45 ` [PATCH 1/2] clk: imx: Manage the OF clock providers for i.MX8M and i.MX93 Guangshuo Li
2026-11-28 9:45 ` [PATCH 2/2] clk: imxrt1050: Fix potential use-after-free on unbind Guangshuo Li
2026-11-28 9:53 ` sashiko-bot [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=sashiko-outbox-238614@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=liguangshuo@mail.sdu.edu.cn \
--cc=linux-clk@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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