android_kernel_motorola_sm6375/drivers/media
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arnd Bergmann 965ccdedf1 media: v4l2-core: compat: ignore native command codes
commit 4a873f3fa5d6ca52e446d306dd7194dd86a09422 upstream.

The do_video_ioctl() compat handler converts the compat command
codes into the native ones before processing further, but this
causes problems for 32-bit user applications that pass a command
code that matches a 64-bit native number, which will then be
handled the same way.

Specifically, this breaks VIDIOC_DQEVENT_TIME from user space
applications with 64-bit time_t, as the structure layout is
the same as the native 64-bit layout on many architectures
(x86 being the notable exception).

Change the handler to use the converted command code only for
passing into the native ioctl handler, not for deciding on the
conversion, in order to make the compat behavior match the
native behavior.

Actual support for the 64-bit time_t version of VIDIOC_DQEVENT_TIME
and other commands still needs to be added in a separate patch.

Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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>
2020-02-11 04:35:14 -08:00
..
cec media: cec: check 'transmit_in_progress', not 'transmitting' 2020-01-09 10:19:56 +01:00
common
dvb-core
dvb-frontends
firewire
i2c media: ov6650: Fix default format not applied on device probe 2020-01-17 19:48:56 +01:00
mc
mmc
pci media: cx88: Fix some error handling path in 'cx8800_initdev()' 2019-12-31 16:43:55 +01:00
platform media: aspeed-video: Fix memory leaks in aspeed_video_probe 2020-01-17 19:48:58 +01:00
radio media: si470x-i2c: add missed operations in remove 2019-12-31 16:45:13 +01:00
rc media: rc: mark input device as pointing stick 2019-12-13 08:42:45 +01:00
spi
tuners
usb media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors 2020-02-11 04:35:07 -08:00
v4l2-core media: v4l2-core: compat: ignore native command codes 2020-02-11 04:35:14 -08:00
Kconfig
Makefile