* [PATCH v2] interconnect: imx: Hold a device reference for main NoC QoS
@ 2026-12-02 7:00 Yige Jiang
2026-12-02 20:23 ` Frank Li
0 siblings, 1 reply; 2+ messages in thread
From: Yige Jiang @ 2026-12-02 7:00 UTC (permalink / raw)
To: Georgi Djakov
Cc: Yige Jiang, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, linux-pm, imx, linux-arm-kernel, linux-kernel,
stable
imx_icc_node_destroy() drops the device reference held in qos_dev. For
nodes found by of_find_device_by_node(), the lookup supplies that
reference. For the main NoC node, imx_icc_node_init_qos() stores the
provider device without taking a reference. Removing the provider then
drops a reference belonging to another owner.
Take a reference to the provider device when assigning it to qos_dev so
that both paths own the reference released at teardown.
Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
Changes in v2:
- Updated the commit message. No code changes.
v1: https://lore.kernel.org/r/20261201183829.474c6efd48b8.imx-icc@gmail.com/
Review: https://lore.kernel.org/r/aw71FFXhTWEVqUm0@SMW015318/
drivers/interconnect/imx/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
index 9511f80cf041..f930a947a622 100644
--- a/drivers/interconnect/imx/imx.c
+++ b/drivers/interconnect/imx/imx.c
@@ -124,7 +124,7 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
struct platform_device *pdev;
if (adj->main_noc) {
- node_data->qos_dev = dev;
+ node_data->qos_dev = get_device(dev);
dev_dbg(dev, "icc node %s[%d] is main noc itself\n",
node->name, node->id);
} else {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] interconnect: imx: Hold a device reference for main NoC QoS
2026-12-02 7:00 [PATCH v2] interconnect: imx: Hold a device reference for main NoC QoS Yige Jiang
@ 2026-12-02 20:23 ` Frank Li
0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2026-12-02 20:23 UTC (permalink / raw)
To: Yige Jiang
Cc: Georgi Djakov, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, linux-pm, imx, linux-arm-kernel, linux-kernel,
stable
On Wed, Dec 02, 2026 at 03:00:45PM +0800, Yige Jiang wrote:
> imx_icc_node_destroy() drops the device reference held in qos_dev. For
> nodes found by of_find_device_by_node(), the lookup supplies that
> reference. For the main NoC node, imx_icc_node_init_qos() stores the
> provider device without taking a reference. Removing the provider then
> drops a reference belonging to another owner.
>
> Take a reference to the provider device when assigning it to qos_dev so
> that both paths own the reference released at teardown.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Changes in v2:
> - Updated the commit message. No code changes.
>
> v1: https://lore.kernel.org/r/20261201183829.474c6efd48b8.imx-icc@gmail.com/
> Review: https://lore.kernel.org/r/aw71FFXhTWEVqUm0@SMW015318/
>
> drivers/interconnect/imx/imx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
> index 9511f80cf041..f930a947a622 100644
> --- a/drivers/interconnect/imx/imx.c
> +++ b/drivers/interconnect/imx/imx.c
> @@ -124,7 +124,7 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
> struct platform_device *pdev;
>
> if (adj->main_noc) {
> - node_data->qos_dev = dev;
> + node_data->qos_dev = get_device(dev);
> dev_dbg(dev, "icc node %s[%d] is main noc itself\n",
> node->name, node->id);
> } else {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-02 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 7:00 [PATCH v2] interconnect: imx: Hold a device reference for main NoC QoS Yige Jiang
2026-12-02 20:23 ` Frank Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox