linux-stable/drivers/media
Arnd Bergmann 75fa2dadb7 media: v4l2-core: fix VIDIOC_DQEVENT handling on non-x86
[ Upstream commit 678d92b612 ]

My previous bugfix addressed an API inconsistency found by syzbot,
and it correctly fixed the issue on x86-64 machines, which now behave
correctly for both native and compat tasks.

Unfortunately, John found that the patch broke compat mode on all other
architectures, as they can no longer rely on the VIDIOC_DQEVENT_TIME32
code from the native handler as a fallback in the compat code.

The best way I can see for addressing this is to generalize the
VIDIOC_DQEVENT32_TIME32 code from x86 and use that for all architectures,
leaving only the VIDIOC_DQEVENT32 variant as x86 specific. The original
code was trying to be clever and use the same conversion helper for native
32-bit code and compat mode, but that turned out to be too obscure so
even I missed that bit I had introduced myself when I made the fix.

Fixes: c344f07aa1 ("media: v4l2-core: ignore native time32 ioctls on 64-bit")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-01 09:04:45 +01:00
..
cec media: cec: copy sequence field for the reply 2021-12-01 09:04:41 +01:00
common media: videobuf2-dma-sg: Fix buf->vb NULL pointer dereference 2021-11-18 19:17:21 +01:00
dvb-core media: dvb-core: frontend: make GET/SET safer 2021-06-17 09:29:11 +02:00
dvb-frontends media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable() 2021-11-18 19:16:30 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: i2c: ths8200 needs V4L2_ASYNC 2021-11-18 19:16:28 +01:00
mc media: mc-device.c: use DEVICE_ATTR_RO() helper macro 2021-08-04 14:43:50 +02:00
mmc
pci media: ivtv: fix build for UML 2021-11-18 19:16:34 +01:00
platform media: venus: fix vpp frequency calculation for decoder 2021-11-18 19:16:30 +01:00
radio media: si470x: Avoid card name truncation 2021-11-18 19:16:29 +01:00
rc media: ir_toy: assignment to be16 should be of correct type 2021-11-18 19:16:34 +01:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vidtv: move kfree(dvb) to vidtv_bridge_dev_release() 2021-11-18 19:17:20 +01:00
tuners
usb media: em28xx: Don't use ops->suspend if it is NULL 2021-11-18 19:16:29 +01:00
v4l2-core media: v4l2-core: fix VIDIOC_DQEVENT handling on non-x86 2021-12-01 09:04:45 +01:00
Kconfig
Makefile