[PATCH v3 0/2] staging: iio: ad7816: Fix DMA from stack and race conditions
From: Abdelnasser Hussein
Date: Mon Aug 03 2026 - 10:06:50 EST
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