linux/drivers/media
Pi-Hsun Shih df4a3e7f88 media: v4l2-ctrl: Lock main_hdl on operations of requests_queued.
There's a race condition between the list_del_init in the
v4l2_ctrl_request_complete, and the list_add_tail in the
v4l2_ctrl_request_queue, since they can be called in different thread
and the requests_queued list is not protected by a lock. This can lead
to that the v4l2_ctrl_handler is still in the requests_queued list while
the request_is_queued is already set to false, which would cause
use-after-free if the v4l2_ctrl_handler is later released.

Fix this by locking the ->lock of main_hdl (which is the owner of the
requests_queued list) when doing list operations on the
->requests_queued list.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10 07:29:10 +01:00
..
cec media: cec-pin: add 'received' callback 2019-10-24 18:31:24 -03:00
common media: siano: fix spelling mistake "ENBALE" -> "ENABLE" 2019-11-08 07:31:40 +01:00
dvb-core media: dvb-core: fix a memory leak bug 2019-08-21 18:39:54 -03:00
dvb-frontends media: cxd2841er: avoid too many status inquires 2019-10-16 12:24:30 -03:00
firewire media: firewire: Make structure fdtv_ca constant 2019-08-21 18:39:55 -03:00
i2c media: ov6650: fix smatch warning 2019-11-08 07:28:22 +01:00
mc media: mc-device.c: fix memleak in media_device_register_entity 2019-10-01 12:26:35 -03:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media: mantis: fix two smatch errors 2019-11-08 07:30:47 +01:00
platform media: coda: disable decoder crop selections 2019-11-10 07:27:40 +01:00
radio media: si470x-i2c: add missed operations in remove 2019-11-10 07:28:15 +01:00
rc media: rc: add keymap for Beelink GS1 remote control 2019-11-09 09:16:55 +01:00
spi media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
tuners media: tuners: Use the correct style for SPDX License Identifier 2019-10-24 18:57:55 -03:00
usb media: dvbsky: remove unused code 2019-11-09 09:15:57 +01:00
v4l2-core media: v4l2-ctrl: Lock main_hdl on operations of requests_queued. 2019-11-10 07:29:10 +01:00
Kconfig media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00