aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Wang <[email protected]>2023-11-06 15:48:09 +0100
committerMauro Carvalho Chehab <[email protected]>2023-11-23 13:37:04 +0100
commitd8212c5c87c143ca01b78f6bf61244af07e0058e (patch)
treecba5135f3fd5cbe11c39ee15f4f53113c77e716c
parentc411b39df8b84945e6d93e8c5ea586eaa5466f2a (diff)
media: mtk-jpeg: Remove cancel worker in mtk_jpeg_remove to avoid the crash of multi-core JPEG devices
This patch reverts commit c677d7ae8314 ("media: mtk-jpeg: Fix use after free bug due to uncanceled work"). The job_timeout_work is initialized only for the single-core JPEG device so it will cause the crash for multi-core JPEG devices. Fix it by removing the cancel_delayed_work_sync function. Fixes: c677d7ae8314 ("media: mtk-jpeg: Fix use after free bug due to uncanceled work") Signed-off-by: Zheng Wang <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r--drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
index 73a063b1569b..7c2e6a2f6c40 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
@@ -1402,7 +1402,6 @@ static void mtk_jpeg_remove(struct platform_device *pdev)
{
struct mtk_jpeg_dev *jpeg = platform_get_drvdata(pdev);
- cancel_delayed_work_sync(&jpeg->job_timeout_work);
pm_runtime_disable(&pdev->dev);
video_unregister_device(jpeg->vdev);
v4l2_m2m_release(jpeg->m2m_dev);