Re: [PATCH v2 1/4] hwmon: (ina2xx) Acquire hwmon_lock in shunt_resistor_show()

From: Guenter Roeck

Date: Fri Aug 21 2026 - 01:11:57 EST


On Thu, Aug 20, 2026 at 06:09:21AM -0700, Jared Kangas wrote:
> shunt_resistor_store() currently acquires hwmon_lock to set
> data->rshunt, but the corresponding access in shunt_resistor_show() is
> unprotected. Acquire the lock in shunt_resistor_show() as well to ensure
> proper synchronization.
>
> Fixes: 3ad867001c91 ("hwmon: (ina2xx) fix sysfs shunt resistor read access")
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/20260729162836.89BDF1F00A3A@xxxxxxxxxxxxxxx/
> Signed-off-by: Jared Kangas <jkangas@xxxxxxxxxx>

Applied.

Thanks,
Guenter