linux_dsm_epyc7002/drivers/iio/buffer
Martin Kelly c043ec1ca5 iio:buffer: make length types match kfifo types
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>
2018-03-30 11:14:32 +01:00
..
industrialio-buffer-cb.c IIO: consumer: allow to set buffer sizes 2018-01-10 10:30:14 +00:00
industrialio-buffer-dma.c iio:buffer: make length types match kfifo types 2018-03-30 11:14:32 +01:00
industrialio-buffer-dmaengine.c iio: buffer-dmaengine: Add missing header buffer_impl.h 2017-06-13 20:56:05 +01:00
industrialio-hw-consumer.c IIO: hw_consumer: add devm_iio_hw_consumer_alloc 2018-01-10 10:30:07 +00:00
industrialio-triggered-buffer.c iio: add resource managed triggered buffer init helpers 2016-09-04 15:42:46 +01:00
Kconfig iio: Add hardware consumer buffer support 2018-01-10 10:30:05 +00:00
kfifo_buf.c iio:buffer: make length types match kfifo types 2018-03-30 11:14:32 +01:00
Makefile iio: Add hardware consumer buffer support 2018-01-10 10:30:05 +00:00