linux-stable/drivers/iio
Nuno Sá 19ef7b70ca iio: buffer: Fix demux update
When updating the buffer demux, we will skip a scan element from the
device in the case `in_ind != out_ind` and we enter the while loop.
in_ind should only be refreshed with `find_next_bit()` in the end of the
loop.

Note, to cause problems we need a situation where we are skippig over
an element (channel not enabled) that happens to not have the same size
as the next element.   Whilst this is a possible situation we haven't
actually identified any cases in mainline where it happens as most drivers
have consistent channel storage sizes with the exception of the timestamp
which is the last element and hence never skipped over.

Fixes: 5ada4ea9be ("staging:iio: add demux optionally to path from device to buffer")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20201112144323.28887-1-nuno.sa@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-12-03 19:32:44 +00:00
..
accel iio: accel: bmc150-accel: Add rudimentary regulator support 2020-12-03 19:32:41 +00:00
adc iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack 2020-12-03 19:32:40 +00:00
afe iio: afe: iio-rescale: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
amplifiers iio: amplifiers: hmc425a: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
buffer iio: buffer: Return error if no callback is given 2020-12-03 19:32:40 +00:00
chemical Second set of features and cleanups for IIO in 5.10 2020-09-22 09:45:11 +02:00
common First set of new device support, features and cleanups for IIO in the 5.11 cycle 2020-11-24 08:30:08 +01:00
dac iio: dac: ad7303: remove platform data header 2020-10-10 18:03:28 +01:00
dummy iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain' 2020-09-21 18:41:36 +01:00
frequency iio: frequency: adf4350: Replace indio_dev->mlock with own device lock 2020-09-16 18:58:01 +01:00
gyro iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. 2020-09-21 20:01:50 +01:00
health Second set of features and cleanups for IIO in 5.10 2020-09-22 09:45:11 +02:00
humidity iio: humidity: hts221: add vdd voltage regulator 2020-12-03 19:32:39 +00:00
imu iio: imu: st_lsm6dsx: add vdd-vddio voltage regulator 2020-11-25 14:36:16 +00:00
light First set of new device support, features and cleanups for IIO in the 5.11 cycle 2020-11-24 08:30:08 +01:00
magnetometer iio: magnetometer: bmc150: remove unneeded semicolon 2020-11-01 14:59:46 +00:00
multiplexer iio: multiplexer: iio-mux: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
orientation iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
position iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
potentiometer iio: potentiometer: ad5272: Correct polarity of reset 2020-12-03 19:32:42 +00:00
potentiostat iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessors 2020-09-21 18:41:29 +01:00
pressure iio: pressure: bmp280: remove unneeded semicolon 2020-11-01 14:58:54 +00:00
proximity iio: proximity: vl53l0x-i2c add i2c_device_id 2020-11-01 15:28:32 +00:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature iio: ltc2983: Fix of_node refcounting 2020-09-29 17:34:18 +01:00
trigger iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
iio_core.h iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
iio_core_trigger.h iio: trigger: make stub functions static inline 2020-08-22 10:53:18 +01:00
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-03 19:32:44 +00:00
industrialio-configfs.c
industrialio-core.c iio: core: Simplify iio_format_list() 2020-12-03 19:32:44 +00:00
industrialio-event.c iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: Add __printf() attributes to various allocation functions 2020-09-21 18:54:18 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: drop devm_iio_channel_release{_all} API calls 2020-04-19 16:56:37 +01:00
Kconfig iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol 2020-09-29 17:27:08 +01:00
Makefile iio: position: Add support for Azoteq IQS624/625 angle sensors 2020-03-27 08:25:59 +00:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00