linux-brain/drivers/media/pci/saa7134
Arnd Bergmann 917791e434 media: subdev: disallow ioctl for saa6588/davinci
commit 0a7790be182d32b9b332a37cb4206e24fe94b728 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-19 08:53:17 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile media: don't include drivers/media/i2c at cflags 2017-12-28 14:14:09 -05:00
saa7134-alsa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
saa7134-cards.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
saa7134-core.c media: media/pci: set device_caps in struct video_device 2019-06-24 14:57:12 -04:00
saa7134-dvb.c media: saa7134: keep demod i2c gate closed on Medion 7134 2019-08-26 10:45:19 -03:00
saa7134-empress.c media: media/pci: Fix memleak in empress_init 2021-03-04 10:26:20 +01:00
saa7134-go7007.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
saa7134-i2c.c media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate() 2019-08-26 10:45:49 -03:00
saa7134-input.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
saa7134-reg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
saa7134-ts.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
saa7134-tvaudio.c media: saa7134: avoid a shift overflow 2020-10-29 09:58:03 +01:00
saa7134-vbi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
saa7134-video.c media: subdev: disallow ioctl for saa6588/davinci 2021-07-19 08:53:17 +02:00
saa7134.h media: media/pci: don't set description for ENUM_FMT 2019-07-22 14:40:32 -04:00