[PATCH v3 0/2] staging: iio: ad7816: Fix DMA from stack and race conditions
Abdelnasser Hussein <[email protected]> Mon, 3 Aug 2026 16:43:42 +0300
| Newsgroups | org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This patch series addresses two issues in the ad7816 driver: 1. Adds a mutex to prevent race conditions during SPI reads. 2. Moves the DMA buffer from the stack to the device structure and aligns it properly using IIO_DMA_MINALIGN. Changes in v3: - Fixed a formatting issue in the v2 cover letter that caused it to be sent empty. No code changes. Changes in v2: - Added a mutex to protect the SPI read sequence. - Used __aligned(IIO_DMA_MINALIGN) for the DMA buffer. - Corrected the sizeof() argument in spi_read(). - Added the missing Fixes: tag. Abdelnasser Hussein (2): staging: iio: ad7816: serialize ad7816_spi_read() with a mutex staging: iio: ad7816: avoid DMA from stack in spi_read drivers/staging/iio/adc/ad7816.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- 2.54.0