android_kernel_motorola_sm6375/drivers/iio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Luca Ceresoli a9c56ccb7c iio: light: opt3001: fix deadlock due to concurrent flag access
[ Upstream commit f063a28002e3350088b4577c5640882bf4ea17ea ]

The threaded IRQ function in this driver is reading the flag twice: once to
lock a mutex and once to unlock it. Even though the code setting the flag
is designed to prevent it, there are subtle cases where the flag could be
true at the mutex_lock stage and false at the mutex_unlock stage. This
results in the mutex not being unlocked, resulting in a deadlock.

Fix it by making the opt3001_irq() code generally more robust, reading the
flag into a variable and using the variable value at both stages.

Fixes: 94a9b7b180 ("iio: light: add support for TI's opt3001 light sensor")
Cc: stable@vger.kernel.org
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20250321-opt3001-irq-fix-v1-1-6c520d851562@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
[ Adjust context ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-09 18:44:00 +02:00
..
accel iio: adis16201: Correct inclinometer channel resolution 2025-06-04 14:32:26 +02:00
adc iio: adc: stm32-adc: Fix race in installing chained IRQ handler 2025-08-28 16:21:15 +02:00
addac
afe
amplifiers
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-09-12 11:03:55 +02:00
chemical iio: chemical: pms7003: use aligned_s64 for timestamp 2025-09-09 18:44:00 +02:00
common iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-11-08 16:20:48 +01:00
dac iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig 2024-11-08 16:20:48 +01:00
dummy iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer 2025-02-01 18:18:47 +01:00
frequency
gyro iio: gyro: fxas21002c: Fix missing data update in trigger handler 2025-02-01 18:18:48 +01:00
health
humidity
imu iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo 2025-06-04 14:32:27 +02:00
light iio: light: opt3001: fix deadlock due to concurrent flag access 2025-09-09 18:44:00 +02:00
magnetometer iio: magnetometer: ak8975: Fix reading for ak099xx sensors 2024-11-08 16:20:41 +01:00
multiplexer
orientation
potentiometer
potentiostat
pressure iio: pressure: zpa2326: Use aligned_s64 for the timestamp 2025-07-17 18:24:50 +02:00
proximity iio: proximity: isl29501: fix buffered read on big-endian systems 2025-08-28 16:21:32 +02:00
resolver
temperature
trigger
iio_core.h
iio_core_trigger.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: inkern: call iio_device_put() only on mapped devices 2025-02-01 18:18:48 +01:00
Kconfig
Makefile