Files
linux/drivers
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
..
2012-05-24 16:22:53 -04:00
2012-05-31 08:46:50 +02:00
2012-05-02 00:25:13 +02:00
2012-05-08 12:35:06 +02:00
2012-05-29 16:22:32 -07:00
2012-06-02 17:09:08 -04:00
2012-05-07 09:56:39 +08:00
2012-05-16 12:46:37 -04:00
2012-06-15 14:39:18 -07:00