android_kernel_motorola_sm6375/drivers/iio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nuno Sá 0111032d9a iio: inkern: only release the device node when done with it
[ Upstream commit 79c3e84874c7d14f04ad58313b64955a0d2e9437 ]

'of_node_put()' can potentially release the memory pointed to by
'iiospec.np' which would leave us with an invalid pointer (and we would
still pass it in 'of_xlate()'). Note that it is not guaranteed for the
of_node lifespan to be attached to the device (to which is attached)
lifespan so that there is (even though very unlikely) the possibility
for the node to be freed while the device is still around. Thus, as there
are indeed some of_xlate users which do access the node, a race is indeed
possible.

As such, we can only release the node after we are done with it.

Fixes: 17d82b47a2 ("iio: Add OF support")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220715122903.332535-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:22:34 +02:00
..
accel iio: accel: mma8452: ignore the return value of reset operation 2022-06-29 08:58:48 +02:00
adc iio: adc: at91-sama5d2_adc: lock around oversampling and sample freq 2022-10-26 13:22:34 +02:00
afe
amplifiers
buffer
chemical iio:chemical:ccs811: rearrange iio trigger get and register 2022-06-29 08:58:47 +02:00
common iio: st_sensors: Add a local lock for protecting odr 2022-06-14 18:11:59 +02:00
dac iio: dac: ad5593r: Fix i2c read protocol requirements 2022-10-26 13:22:12 +02:00
dummy iio: dummy: iio_simple_dummy: check the return value of kstrdup() 2022-06-14 18:11:59 +02:00
frequency
gyro iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up() 2022-06-29 08:58:48 +02:00
health
humidity
imu
light iio: light: isl29028: Fix the warning in isl29028_remove() 2022-08-25 11:17:24 +02:00
magnetometer iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-09 09:03:21 +02:00
multiplexer
orientation
potentiometer
potentiostat
pressure iio: pressure: dps310: Reset chip after timeout 2022-10-26 13:22:12 +02:00
proximity
resolver
temperature
trigger iio: trigger: sysfs: fix use-after-free on remove 2022-06-29 08:58:48 +02:00
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: only release the device node when done with it 2022-10-26 13:22:34 +02:00
Kconfig
Makefile