Skip to contentSkip to conversation

interconnect: exynos: Remove the PM QoS request on unbind

PATCH New Myeonghun Pak 1 participant 1 message Sep 11

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 interconnect: exynos: Remove the PM QoS request on unbind

The Exynos interconnect provider adds a minimum-frequency PM QoS request to its parent devfreq device. The request is embedded in the provider's device-managed private data.

The probe error path removes the request, but the remove callback does not. Unbinding the provider while the parent device remains registered therefore frees the private data with the request still on the parent's QoS list. The child's device cleanup does not remove requests registered against its parent.

Remove the request after deregistering the provider, before the private data is released.

This issue was identified during our ongoing static-analysis research while reviewing kernel code.

Fixes 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs")
---
 drivers/interconnect/samsung/exynos.c | 1 +
 1 file changed, 1 insertion(+)
drivers/interconnect/samsung/exynos.c +1 -0
index 8e8f56186a3669ee834c21bb73e13eabf2cf68fa..9a4789fadac2ea5ecd017db12e2cc226eeba4f17 100644
@@ -98,6 +98,7 @@ static void exynos_generic_icc_remove(struct platform_device *pdev)
 	struct exynos_icc_priv *priv = platform_get_drvdata(pdev);
 
 	icc_provider_deregister(&priv->provider);
+	dev_pm_qos_remove_request(&priv->qos_req);
 	icc_nodes_remove(&priv->provider);
 }
 
Signature · 1 line
2.53.0