]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 13 Apr 2025 10:34:36 +0000 (11:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:24:09 +0000 (08:24 +0200)
commit85d430aef40ad5c426ec21a9e2f98ca6e401ea36
tree60985acfae2303db2b171db2f48ef810f8250cc5
parent2b58e7c1e4b2bd7829443907d9f1009863c589a9
iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer.

[ Upstream commit f79aeb6c631b57395f37acbfbe59727e355a714c ]

The trick of using __aligned(IIO_DMA_MINALIGN) ensures that there is
no overlap between buffers used for DMA and those used for driver
state storage that are before the marking. It doesn't ensure
anything above state variables found after the marking. Hence
move this particular bit of state earlier in the structure.

Fixes: 10897f34309b ("iio: temp: maxim_thermocouple: Fix alignment for DMA safety")
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-14-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/temperature/maxim_thermocouple.c