* [PATCH] media: qcom: iris: cancel sys error work on driver removal
@ 2026-06-04 5:47 Hungyu Lin
2026-06-07 20:44 ` Dmitry Baryshkov
2026-06-08 6:23 ` Vishnu Reddy
0 siblings, 2 replies; 3+ messages in thread
From: Hungyu Lin @ 2026-06-04 5:47 UTC (permalink / raw)
To: vikash.garodia, bod, mchehab
Cc: abhinav.kumar, stefan.schmidt, hverkuil, linux-media,
linux-arm-msm, linux-kernel, Hungyu Lin
Cancel sys_error_handler before tearing down the driver.
The delayed work may still be pending when iris_remove()
runs. Since iris_core is allocated with devm_kzalloc(),
allowing the work to execute after driver removal could
result in accessing freed memory.
Fixes: fb583a214337 ("media: iris: introduce host firmware interface with necessary hooks")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/media/platform/qcom/iris/iris_probe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
index ddaacda523ec..1a740542bc81 100644
--- a/drivers/media/platform/qcom/iris/iris_probe.c
+++ b/drivers/media/platform/qcom/iris/iris_probe.c
@@ -192,6 +192,8 @@ static void iris_remove(struct platform_device *pdev)
if (!core)
return;
+ cancel_delayed_work_sync(&core->sys_error_handler);
+
iris_core_deinit(core);
video_unregister_device(core->vdev_dec);
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: qcom: iris: cancel sys error work on driver removal
2026-06-04 5:47 [PATCH] media: qcom: iris: cancel sys error work on driver removal Hungyu Lin
@ 2026-06-07 20:44 ` Dmitry Baryshkov
2026-06-08 6:23 ` Vishnu Reddy
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2026-06-07 20:44 UTC (permalink / raw)
To: Hungyu Lin
Cc: vikash.garodia, bod, mchehab, abhinav.kumar, stefan.schmidt,
hverkuil, linux-media, linux-arm-msm, linux-kernel
On Thu, Jun 04, 2026 at 05:47:08AM +0000, Hungyu Lin wrote:
> Cancel sys_error_handler before tearing down the driver.
>
> The delayed work may still be pending when iris_remove()
> runs. Since iris_core is allocated with devm_kzalloc(),
> allowing the work to execute after driver removal could
> result in accessing freed memory.
>
> Fixes: fb583a214337 ("media: iris: introduce host firmware interface with necessary hooks")
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/media/platform/qcom/iris/iris_probe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: qcom: iris: cancel sys error work on driver removal
2026-06-04 5:47 [PATCH] media: qcom: iris: cancel sys error work on driver removal Hungyu Lin
2026-06-07 20:44 ` Dmitry Baryshkov
@ 2026-06-08 6:23 ` Vishnu Reddy
1 sibling, 0 replies; 3+ messages in thread
From: Vishnu Reddy @ 2026-06-08 6:23 UTC (permalink / raw)
To: Hungyu Lin, vikash.garodia, bod, mchehab
Cc: abhinav.kumar, stefan.schmidt, hverkuil, linux-media,
linux-arm-msm, linux-kernel
On 6/4/2026 11:17 AM, Hungyu Lin wrote:
> Cancel sys_error_handler before tearing down the driver.
>
> The delayed work may still be pending when iris_remove()
> runs. Since iris_core is allocated with devm_kzalloc(),
> allowing the work to execute after driver removal could
> result in accessing freed memory.
>
> Fixes: fb583a214337 ("media: iris: introduce host firmware interface with necessary hooks")
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/media/platform/qcom/iris/iris_probe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index ddaacda523ec..1a740542bc81 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -192,6 +192,8 @@ static void iris_remove(struct platform_device *pdev)
> if (!core)
> return;
>
> + cancel_delayed_work_sync(&core->sys_error_handler);
> +
> iris_core_deinit(core);
>
> video_unregister_device(core->vdev_dec);
Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-08 6:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 5:47 [PATCH] media: qcom: iris: cancel sys error work on driver removal Hungyu Lin
2026-06-07 20:44 ` Dmitry Baryshkov
2026-06-08 6:23 ` Vishnu Reddy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®