android_kernel_samsung_univ.../include
Martin Kelly 5c39f9f374 iio:buffer: make length types match kfifo types
commit c043ec1ca5baae63726aae32abbe003192bc6eec 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>
[bwh: Backported to 4.4:
 - Drop change to iio_dma_buffer_set_length()
 - Adjust filename, context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:21:30 +02:00
..
acpi
asm-generic asm-generic: provide generic_pmdp_establish() 2018-05-30 07:48:55 +02:00
clocksource
crypto crypto: poly1305 - remove ->setkey() method 2018-02-16 20:09:43 +01:00
drm drm: Allow determining if current task is output poll worker 2018-03-18 11:17:48 +01:00
dt-bindings
keys
kvm
linux iio:buffer: make length types match kfifo types 2018-07-03 11:21:30 +02:00
math-emu
media
memory
misc
net llc: properly handle dev_queue_xmit() return value 2018-05-30 07:49:06 +02:00
pcmcia
ras
rdma RDMA/ucma: Introduce safer rdma_addr_size() variants 2018-04-08 11:51:59 +02:00
rxrpc
scsi
soc
sound ALSA: control: Hardening for potential Spectre v1 2018-05-02 07:53:41 -07:00
target
trace tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account 2018-05-30 07:48:52 +02:00
uapi cfg80211: further limit wiphy names to 64 bytes 2018-06-06 16:46:21 +02:00
video
xen
Kbuild