Re: [PATCH v3 2/4] media: iris: Disable the system error work on removal

From: bod

Date: Mon Nov 30 2026 - 07:52:32 EST


On 2026-11-19 17:15 +0530, Vishnu Reddy wrote:
> iris_remove() calls cancel_delayed_work_sync() to stop the system error
> work. This cancels a pending work and waits for a running one. It does
> not stop the work from being queued again afterwards.
>
> A system error interrupt can still arrive after that call. The
> interrupt handler queues the work again. The work then runs after the
> removal and uses resources that are already freed.
>
> Use disable_delayed_work_sync() instead. Once it returns no new work
> can be queued. The work cannot run again during or after the removal.
>
> Fixes: 452480931648 ("media: iris: cancel sys error work on driver removal")
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>
> Signed-off-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/qcom/iris/iris_probe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index 343e44c6b9c4..6f02bb629867 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -251,7 +251,7 @@ static void iris_remove(struct platform_device *pdev)
> if (!core)
> return;
>

Wouldn't it make sense to devm_free_irq() here before disabling the
work-queue so the interrupt handler can't run for the rest of this routine
?
---
bod