1
0
Fork 0
remarkable-linux/include/linux/iio
Martin Kelly 30ab9366f7 iio:buffer: make length types match kfifo types
commit c043ec1ca5 upstream.

Currently, we use int for buffer length and bytes_per_datum. However,
kfifo uses unsigned int for length and size_t for element size. We need
to make sure these matches or we will have bugs related to overflow (in
the range between INT_MAX and UINT_MAX for length, for example).

In addition, set_bytes_per_datum uses size_t while bytes_per_datum is an
int, which would cause bugs for large values of bytes_per_datum.

Change buffer length to use unsigned int and bytes_per_datum to use
size_t.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-05 11:41:58 +02:00
..
accel iio: accel: kxcjk1013 3-axis accelerometer driver 2014-06-14 17:10:21 +01:00
adc iio: ad_sigma_delta: Implement a dedicated reset function 2017-09-24 16:58:21 +01:00
common iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
dac License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
frequency iio: frequency: adf4350: cast value to unsigned to make code checkers happy 2013-06-04 18:36:52 +01:00
gyro itg3200: fix incorrect ifdef comment 2013-03-18 10:59:42 +01:00
imu iio:adis: Add support for manual self-test flag clear 2016-04-16 13:42:43 +01:00
magnetometer License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
timer iio: stm32: fix adc/trigger link error 2017-12-14 09:52:48 +01:00
buffer-dma.h iio: Add generic DMA buffer infrastructure 2015-10-25 13:54:34 +00:00
buffer-dmaengine.h iio: Add a DMAengine framework based buffer 2015-10-25 13:55:32 +00:00
buffer.h iio:buffer.h - split into buffer.h and buffer_impl.h 2017-01-10 19:54:55 +00:00
buffer_impl.h iio:buffer: make length types match kfifo types 2018-06-05 11:41:58 +02:00
configfs.h iio:configfs: Introduce iio/configfs.h to provide a location for the configfs_subsystem 2015-12-05 16:25:30 +00:00
consumer.h iio: inkern: api for manipulating ext_info of iio channels 2017-06-03 19:29:26 +09:00
driver.h iio: Simplify iio_map_array_unregister API 2013-02-02 12:02:20 +00:00
events.h iio: Export userspace IIO headers 2015-02-14 17:05:03 +00:00
iio.h PATCH] iio: Fix some documentation warnings 2017-08-20 15:21:46 +01:00
kfifo_buf.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machine.h staging:iio:in kernel users: Add a data field for channel specific info. 2012-11-10 10:17:27 +00:00
sw_device.h iio: sw-device: Fix config group initialization 2017-03-13 20:42:34 +00:00
sw_trigger.h iio: sw-trigger: Fix config group initialization 2016-08-15 15:39:09 +01:00
sysfs.h include: linux: iio: add IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros 2016-10-01 14:43:59 +01:00
trigger.h PATCH] iio: Fix some documentation warnings 2017-08-20 15:21:46 +01:00
trigger_consumer.h iio:trigger_consumer.h: Add missing includes and forward declarations 2012-08-27 18:57:59 +01:00
triggered_buffer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
triggered_event.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
types.h iio:core: add a callback to allow drivers to provide _available attributes 2016-11-13 11:40:25 +00:00