* [PATCH] media: venus: remove invalid compat_ioctl32 handler
@ 2019-11-06 9:06 Arnd Bergmann
2019-11-06 10:09 ` Stanimir Varbanov
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-11-06 9:06 UTC (permalink / raw)
To: Stanimir Varbanov, Mauro Carvalho Chehab
Cc: Arnd Bergmann, stable, Hans Verkuil, Mauro Carvalho Chehab,
Andy Gross, Hans Verkuil, linux-media, linux-arm-msm,
linux-kernel
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.
Cc: stable@vger.kernel.org
Fixes: 7472c1c69138 ("[media] media: venus: vdec: add video decoder files")
Fixes: aaaa93eda64b ("[media] media: venus: venc: add video encoder files")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/platform/qcom/venus/vdec.c | 3 ---
drivers/media/platform/qcom/venus/venc.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 7f4660555ddb..59ae7a1e63bc 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -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)
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 1b7fb2d5887c..30028ceb548b 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -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)
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: venus: remove invalid compat_ioctl32 handler
2019-11-06 9:06 [PATCH] media: venus: remove invalid compat_ioctl32 handler Arnd Bergmann
@ 2019-11-06 10:09 ` Stanimir Varbanov
0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2019-11-06 10:09 UTC (permalink / raw)
To: Arnd Bergmann, Mauro Carvalho Chehab
Cc: stable, Hans Verkuil, Mauro Carvalho Chehab, Andy Gross,
Hans Verkuil, linux-media, linux-arm-msm, linux-kernel
Hi Arnd,
Thanks for the catch!
On 11/6/19 11:06 AM, Arnd Bergmann wrote:
> 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.
>
> Cc: stable@vger.kernel.org
> Fixes: 7472c1c69138 ("[media] media: venus: vdec: add video decoder files")
> Fixes: aaaa93eda64b ("[media] media: venus: venc: add video encoder files")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 3 ---
> drivers/media/platform/qcom/venus/venc.c | 3 ---
> 2 files changed, 6 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 7f4660555ddb..59ae7a1e63bc 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -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)
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index 1b7fb2d5887c..30028ceb548b 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -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)
>
--
regards,
Stan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-06 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 9:06 [PATCH] media: venus: remove invalid compat_ioctl32 handler Arnd Bergmann
2019-11-06 10:09 ` Stanimir Varbanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).