[PATCH v5 0/2] staging: iio: adc: ad7816: Fix SPI read race condition and DMA safety

Abdelnasser Hussein posted 2 patches 2 weeks ago
There is a newer version of this series
drivers/staging/iio/adc/ad7816.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
[PATCH v5 0/2] staging: iio: adc: ad7816: Fix SPI read race condition and DMA safety
Posted by Abdelnasser Hussein 2 weeks ago
This series addresses two separate issues in the ad7816 driver:
1. A race condition during SPI reads where multiple threads could
   disrupt the GPIO state.
2. A DMA safety issue caused by using a stack-allocated buffer for
   SPI transfers.

Changes in v5:
- Split the changes into two separate patches for bisectability, as
  requested by reviewers.
- Patch 1 focuses only on serializing the SPI read operations using
  guard(mutex) and devm_mutex_init().
- Patch 2 focuses only on replacing the stack buffer with a dedicated
  rx_buf aligned with IIO_DMA_MINALIGN.
- Updated commit messages to better describe the architectural issues.

Abdelnasser Hussein (2):
  staging: iio: adc: ad7816: Serialize SPI read operations
  staging: iio: adc: ad7816: Use DMA-safe buffer for SPI read

 drivers/staging/iio/adc/ad7816.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

-- 
2.54.0