Re: [PATCH 06/10] remoteproc: imx_rproc: Register SCU cleanup after resource acquisition
From: Peng Fan (OSS)
Date: Mon Nov 23 2026 - 22:28:22 EST
On Mon, 23 Nov 2026 17:20:50 +0000 Lee Jones <lee@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
Reviewed-by: Peng Fan <peng.fan@xxxxxxx>