Skip to contentSkip to conversation

media: venus: remove invalid compat_ioctl32 handler

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 6, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: venus: remove invalid compat_ioctl32 handler

v4l2_compat_ioctl32() is the function that calls into v4l2_file_operations->compat_ioctl32(), so setting that back to the same function leads to a trivial endless loop, followed by a kernel stack overrun.

Remove the incorrect assignment.

Fixes 7472c1c69138 ("[media] media: venus: vdec: add video decoder files")
Fixes aaaa93eda64b ("[media] media: venus: venc: add video encoder files")
---
 drivers/media/platform/qcom/venus/vdec.c | 3 ---
 drivers/media/platform/qcom/venus/venc.c | 3 ---
 2 files changed, 6 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +0 -3
index 7f4660555ddb..59ae7a1e63bc 100644
@@ -1412,9 +1412,6 @@ static const struct v4l2_file_operations vdec_fops = {
 	.unlocked_ioctl = video_ioctl2,
 	.poll = v4l2_m2m_fop_poll,
 	.mmap = v4l2_m2m_fop_mmap,
-#ifdef CONFIG_COMPAT
-	.compat_ioctl32 = v4l2_compat_ioctl32,
-#endif
 };
 
 static int vdec_probe(struct platform_device *pdev)
drivers/media/platform/qcom/venus/venc.c +0 -3
index 1b7fb2d5887c..30028ceb548b 100644
@@ -1235,9 +1235,6 @@ static const struct v4l2_file_operations venc_fops = {
 	.unlocked_ioctl = video_ioctl2,
 	.poll = v4l2_m2m_fop_poll,
 	.mmap = v4l2_m2m_fop_mmap,
-#ifdef CONFIG_COMPAT
-	.compat_ioctl32 = v4l2_compat_ioctl32,
-#endif
 };
 
 static int venc_probe(struct platform_device *pdev)
Signature · 1 line
2.20.0
Acked-by on v1 1/1
#1 lore raw

Hi Arnd,

Thanks for the catch!

Quoted 11 lines · Arnd Bergmann

v4l2_compat_ioctl32() is the function that calls into v4l2_file_operations->compat_ioctl32(), so setting that back to the same function leads to a trivial endless loop, followed by a kernel stack overrun.

Remove the incorrect assignment.

Fixes 7472c1c69138 ("[media] media: venus: vdec: add video decoder files")
Fixes aaaa93eda64b ("[media] media: venus: venc: add video encoder files")
Quoted 34 lines
---
 drivers/media/platform/qcom/venus/vdec.c | 3 ---
 drivers/media/platform/qcom/venus/venc.c | 3 ---
 2 files changed, 6 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +0 -3
index 7f4660555ddb..59ae7a1e63bc 100644
@@ -1412,9 +1412,6 @@ static const struct v4l2_file_operations vdec_fops = {
 	.unlocked_ioctl = video_ioctl2,
 	.poll = v4l2_m2m_fop_poll,
 	.mmap = v4l2_m2m_fop_mmap,
-#ifdef CONFIG_COMPAT
-	.compat_ioctl32 = v4l2_compat_ioctl32,
-#endif
 };
 
 static int vdec_probe(struct platform_device *pdev)
drivers/media/platform/qcom/venus/venc.c +0 -3
index 1b7fb2d5887c..30028ceb548b 100644
@@ -1235,9 +1235,6 @@ static const struct v4l2_file_operations venc_fops = {
 	.unlocked_ioctl = video_ioctl2,
 	.poll = v4l2_m2m_fop_poll,
 	.mmap = v4l2_m2m_fop_mmap,
-#ifdef CONFIG_COMPAT
-	.compat_ioctl32 = v4l2_compat_ioctl32,
-#endif
 };
 
 static int venc_probe(struct platform_device *pdev)
Signature · 2 lines
regards,
Stan