Re: [PATCH v6 03/12] iio: dac: ad5686: acquire lock when doing powerdown control
From: Jonathan Cameron
Date: Wed May 06 2026 - 13:20:23 EST
On Tue, 05 May 2026 13:35:04 +0100
Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@xxxxxxxxxx> wrote:
> From: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
>
> Protect access of pwr_down_mode and pwr_down_mask fields with existing
> mutex lock. Each channel exposes their own attributes for controlling
> powerdown modes and powerdown state. This fixes potential race conditions
> as those the write functions perform non-atomic read-modify-write
> operations to those pwr_down_* fields. This issue exists since the ad5686
> driver was first introduced.
>
> Fixes: c2f37c8dcadc ("iio: dac: New driver for AD5686R, AD5685R, AD5684R Digital to analog converters")
> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
Applied to the fixes-togreg branch of iio.git (1 and 2 already on there)
Marked for stable.