[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210406173428.19283-1-mirela.rabulea@oss.nxp.com>
Date: Tue, 6 Apr 2021 20:34:28 +0300
From: "Mirela Rabulea (OSS)" <mirela.rabulea@....nxp.com>
To: mchehab@...nel.org, hverkuil-cisco@...all.nl
Cc: linux-imx@....com, linux-media@...r.kernel.org,
shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, robert.chiras@....com,
laurentiu.palcu@....com, Mirela Rabulea <mirela.rabulea@....com>
Subject: [PATCH] media: imx-jpeg: Fix double free in mxc_jpeg_remove
From: Mirela Rabulea <mirela.rabulea@....com>
The video_unregister_device already calls video_device_release,
so remove video_device_release, to avoid a double free, when removing
the module. This showed up in a repeated rmmod/insmod scenario.
Signed-off-by: Mirela Rabulea <mirela.rabulea@....com>
---
drivers/media/platform/imx-jpeg/mxc-jpeg.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/platform/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/imx-jpeg/mxc-jpeg.c
index 2d29558f1864..ca1b7e8c65f4 100644
--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c
@@ -2099,7 +2099,6 @@ static int mxc_jpeg_remove(struct platform_device *pdev)
mxc_jpeg_free_slot_data(jpeg, slot);
video_unregister_device(jpeg->dec_vdev);
- video_device_release(jpeg->dec_vdev);
v4l2_m2m_release(jpeg->m2m_dev);
v4l2_device_unregister(&jpeg->v4l2_dev);
mxc_jpeg_detach_pm_domains(jpeg);
--
2.17.1
Powered by blists - more mailing lists