linux/drivers/media
Hans Verkuil 35121d0bb7 media: cec-adap.c: fix is_configuring state
[ Upstream commit 59267fc34f ]

If an adapter is trying to claim a free logical address then it is
in the 'is_configuring' state. If during that process the cable is
disconnected (HPD goes low, which in turn invalidates the physical
address), then cec_adap_unconfigure() is called, and that set the
is_configuring boolean to false, even though the thread that's
trying to claim an LA is still running.

Don't touch the is_configuring bool in cec_adap_unconfigure(), it
will eventually be cleared by the thread. By making that change
the cec_config_log_addr() function also had to change: it was
aborting if is_configuring became false (since that is what
cec_adap_unconfigure() did), but that no longer works. Instead
check if the physical address is invalid. That is a much
more appropriate check anyway.

This fixes a bug where the the adapter could be disabled even
though the device was still configuring. This could cause POLL
transmits to time out.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:22:38 +02:00
..
cec media: cec-adap.c: fix is_configuring state 2022-06-09 10:22:38 +02:00
common media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach() 2022-01-27 11:04:42 +01:00
dvb-core media: dmxdev: fix UAF when dvb_register_device() fails 2022-01-27 11:03:14 +01:00
dvb-frontends media: dib8000: Fix a memleak in dib8000_init() 2022-01-27 11:03:29 +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: ccs-core.c: fix failure to call clk_disable_unprepare 2022-06-09 10:22:38 +02:00
mc media: mc-device.c: use DEVICE_ATTR_RO() helper macro 2021-08-04 14:43:50 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: cx25821: Fix the warning when removing the module 2022-06-09 10:22:33 +02:00
platform media: coda: limit frame interval enumeration to supported encoder frame sizes 2022-06-09 10:22:37 +02:00
radio media: si470x-i2c: fix possible memory leak in si470x_i2c_probe() 2022-01-27 11:03:20 +01:00
rc media: imon: reorganize serialization 2022-06-09 10:22:38 +02: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: Check for null return of vzalloc 2022-04-08 14:23:20 +02:00
tuners media: msi001: fix possible null-ptr-deref in msi001_probe() 2022-01-27 11:03:36 +01:00
usb media: hdpvr: initialize dev->worker at hdpvr_register_videodev 2022-04-08 14:24:02 +02:00
v4l2-core media: v4l2-core: Initialize h264 scaling matrix 2022-04-08 14:23:18 +02:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile