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@vger.kernel.org Signed-off-by: Vishnu Reddy --- 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 41dec90f3e2b..4cb678bd56f0 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; - cancel_delayed_work_sync(&core->sys_error_handler); + disable_delayed_work_sync(&core->sys_error_handler); iris_core_deinit(core); -- 2.34.1