Re: [PATCH] soc: qcom: pmic_glink: Make client-lock non-sleeping

From: Andrew Halaney
Date: Wed May 01 2024 - 15:31:05 EST


On Tue, Apr 30, 2024 at 08:38:57PM -0700, Bjorn Andersson wrote:
> From: Bjorn Andersson <quic_bjorande@xxxxxxxxxxx>
>
> The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink:
> don't traverse clients list without a lock")' ensured that the clients
> list is not modified while traversed.
>
> But the callback is made from the GLINK IRQ handler and as such this
> mutual exclusion can not be provided by a (sleepable) mutex.
>
> Replace the mutex with a spinlock.
>
> Fixes: 635ce0db8956 ("soc: qcom: pmic_glink: don't traverse clients list without a lock")
> Signed-off-by: Bjorn Andersson <quic_bjorande@xxxxxxxxxxx>

Reviewed-by: Andrew Halaney <ahalaney@xxxxxxxxxx>