linux/include
Lars-Peter Clausen 0fb6ee8d0b iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack
Use a heap allocated memory for the SPI transfer buffer. Using stack memory
can corrupt stack memory when using DMA on some systems.

This change moves the buffer from the stack of the trigger handler call to
the heap of the buffer of the state struct. The size increases takes into
account the alignment for the timestamp, which is 8 bytes.

The 'data' buffer is split into 'tx_buf' and 'rx_buf', to make a clearer
separation of which part of the buffer should be used for TX & RX.

Fixes: af3008485e ("iio:adc: Add common code for ADI Sigma Delta devices")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201124123807.19717-1-alexandru.ardelean@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-12-03 19:32:40 +00:00
..
acpi
asm-generic Merge branch 'for-5.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu 2020-11-15 08:57:19 -08:00
clocksource
crypto
drm
dt-bindings
keys
kunit kunit: fix display of failed expectations for strings 2020-11-10 13:45:15 -07:00
kvm
linux iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack 2020-12-03 19:32:40 +00:00
math-emu
media
memory
misc
net Linux 5.10-rc5 2020-11-23 08:21:37 +01:00
pcmcia
ras
rdma
scsi scsi: libiscsi: Fix NOP race condition 2020-11-16 22:32:50 -05:00
soc
sound ASoC: Fixes for v5.11 2020-11-19 19:56:29 +01:00
target
trace Just one quick fix for a tracing oops. 2020-11-18 12:06:34 -08:00
uapi Linux 5.10-rc5 2020-11-23 08:21:37 +01:00
vdso
video
xen