[PATCH 06/10] remoteproc: imx_rproc: Register SCU cleanup after resource acquisition

Peng Fan (OSS) peng.fan at oss.nxp.com
Mon Nov 23 19:25:17 PST 2026


On Mon, 23 Nov 2026 17:20:50 +0000 Lee Jones <lee at kernel.org> wrote:

> imx_rproc_scu_api_detect_mode() registers the imx_rproc_put_scu()
> devres cleanup action before attaching power domains or registering the
> SCU partition reboot notifier and enabling its interrupt group.  If
> imx_sc_rm_get_resource_owner() or imx_scu_irq_register_notifier() fails,
> imx_rproc_put_scu() runs during failure unwind and unregisters an
> unregistered notifier block while disabling an unconfigured interrupt
> bit.  Worse, if imx_scu_irq_group_enable() fails, the error path
> explicitly unregisters priv->rproc_nb and devres subsequently invokes
> imx_rproc_put_scu() to unregister the same notifier block a second time.
> 
> Defer devm_add_action_or_reset() until power-domain attachment or SCU
> notifier and interrupt setup have completed.
> 
> Fixes: 9b2451658afa ("remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup")
> Closes: https://sashiko.dev/#/bug/linux-1230a154-7627-4ce2-96f3-d0033709ba4e
> Cc: stable at vger.kernel.org
> Signed-off-by: Lee Jones <lee at kernel.org>

Reviewed-by: Peng Fan <peng.fan at nxp.com>



More information about the linux-arm-kernel mailing list