linux/drivers/iio
Lars-Peter Clausen aff1eb4e3d iio: buffer: Fix NULL pointer deref caused by empty scan mask
iio_scan_mask_match() returns NULL if the passed in scan mask is empty. This
will happen if no channel has been selected and buffer is enabled.
iio_sw_buffer_preenable() will assign NULL to indio_dev->active_scan_mask in
this case. As a result iio_update_demux() will cause a NULL pointer deref,
because it expects active_scan_mask to be non-NULL.

Since it does not make much sense to start data capture if there is no data to
capture this patch updates the code to fail gracefully in iio_scan_mask_match()
instead of crashing the kernel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:39:19 -07:00
..
adc IIO: AT91: Add DT support to at91_adc driver 2012-05-14 13:25:33 -07:00
amplifiers iio: amplifiers: New driver for AD8366 Dual-Digital Variable Gain Amplifier 2012-05-14 13:15:39 -07:00
dac iio: dac: Convert ad5380 to devm_regmap_* APIs 2012-06-15 14:36:25 -07:00
frequency iio: ad9523: Fix argument type mismatch 2012-06-12 14:50:51 -07:00
light iio: add LM3533 ambient-light-sensor driver 2012-06-04 21:12:29 -07:00
iio_core_trigger.h IIO: Move the core files to drivers/iio 2012-04-25 11:11:38 -07:00
iio_core.h IIO: Move the core files to drivers/iio 2012-04-25 11:11:38 -07:00
industrialio-buffer.c iio: buffer: Fix NULL pointer deref caused by empty scan mask 2012-06-15 14:39:19 -07:00
industrialio-core.c Merge branch 'staging-linus' into staging-next 2012-06-13 16:57:09 -07:00
industrialio-event.c iio: Use dev_to_iio_dev() 2012-05-14 13:37:45 -07:00
industrialio-trigger.c iio: Use dev_to_iio_dev() 2012-05-14 13:37:45 -07:00
inkern.c iio:inkern: Use iio_device_{get,put} 2012-06-04 21:21:29 -07:00
Kconfig staging:iio: Move DAC drivers out of staging 2012-06-05 14:02:25 +09:00
kfifo_buf.c IIO: Move the core files to drivers/iio 2012-04-25 11:11:38 -07:00
Makefile staging:iio: Move DAC drivers out of staging 2012-06-05 14:02:25 +09:00