linux-stable/drivers/media/platform/davinci
Arnd Bergmann 0a7790be18 media: subdev: disallow ioctl for saa6588/davinci
The saa6588_ioctl() function expects to get called from other kernel
functions with a 'saa6588_command' pointer, but I found nothing stops it
from getting called from user space instead, which seems rather dangerous.

The same thing happens in the davinci vpbe driver with its VENC_GET_FLD
command.

As a quick fix, add a separate .command() callback pointer for this
driver and change the two callers over to that.  This change can easily
get backported to stable kernels if necessary, but since there are only
two drivers, we may want to eventually replace this with a set of more
specialized callbacks in the long run.

Fixes: c3fda7f835 ("V4L/DVB (10537): saa6588: convert to v4l2_subdev.")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-17 10:18:37 +02:00
..
ccdc_hw_device.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
dm355_ccdc.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
dm355_ccdc_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
dm644x_ccdc.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
dm644x_ccdc_regs.h media: use the BIT() macro 2019-08-26 14:08:50 -03:00
isif.c media: isif: reset global state 2020-11-16 10:31:15 +01:00
isif_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
vpbe.c media: davinci/vpbe.c: ret contains the return code, not err 2021-01-27 08:32:43 +01:00
vpbe_display.c media: subdev: disallow ioctl for saa6588/davinci 2021-06-17 10:18:37 +02:00
vpbe_osd.c media: davinci-vpbe: remove obsolete includes 2019-07-23 08:50:41 -04:00
vpbe_osd_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
vpbe_venc.c media: subdev: disallow ioctl for saa6588/davinci 2021-06-17 10:18:37 +02:00
vpbe_venc_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
vpfe_capture.c media: davinci: fix incorrect pix_fmt assignment 2020-02-24 17:15:01 +01:00
vpif.c media: platform: davinci: Use DEFINE_SPINLOCK() for spinlock 2021-01-12 18:21:34 +01:00
vpif.h media: davinci: replace http references with https 2020-07-19 07:54:47 +02:00
vpif_capture.c media: davinci: fix two kernel-doc comments 2021-05-20 16:05:45 +02:00
vpif_capture.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
vpif_display.c media: davinci: fix two kernel-doc comments 2021-05-20 16:05:45 +02:00
vpif_display.h media: davinci: vpif_display: Remove unused v4l2-async code 2021-02-06 08:46:25 +01:00
vpss.c media: vpss: clean up resources in init 2020-07-19 13:38:08 +02:00