FAILED: patch "[PATCH] iio: adc: ad7923: Fix buffer overflow for tx_buf and" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 3a4187ec454e19903fd15f6e1825a4b84e59a4cd
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024120632-reprogram-skyrocket-0fdd@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3a4187ec454e19903fd15f6e1825a4b84e59a4cd Mon Sep 17 00:00:00 2001
From: Nuno Sa <[email protected]>
Date: Tue, 29 Oct 2024 13:46:37 +0000
Subject: [PATCH] iio: adc: ad7923: Fix buffer overflow for tx_buf and
ring_xfer
The AD7923 was updated to support devices with 8 channels, but the size of tx_buf and ring_xfer was not increased accordingly, leading to a potential buffer overflow in ad7923_update_scan_mode().
drivers/iio/adc/ad7923.c +2 -2
@@ -48,7 +48,7 @@struct ad7923_state {struct spi_device *spi; -struct spi_transfer ring_xfer[5 ]; +struct spi_transfer ring_xfer[9 ];struct spi_transfer scan_single_xfer[2 ];struct spi_message ring_msg;struct spi_message scan_single_msg;
@@ -64,7 +64,7 @@ struct ad7923_state {* Length = 8 channels + 4 extra for 8 byte timestamp */ __be16 rx_buf[12 ]__aligned(IIO_DMA_MINALIGN) ; -__be16 tx_buf[4 ]; +__be16 tx_buf[8 ]; };struct ad7923_chip_info {