Re: [PATCH 3/4] firmware: qcom: scm: initialize tzmem before marking SCM as available
From: Johan Hovold
Date: Wed Jun 25 2025 - 10:39:25 EST
On Wed, Jun 25, 2025 at 10:14:50AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> Now that qcom_scm_shm_bridge_enable() uses the struct device passed to
> it as argument to make the QCOM_SCM_MP_SHM_BRIDGE_ENABLE SCM call, we
> can move the TZMem initialization before the assignment of the __scm
> pointer in the SCM driver (which marks SCM as ready to users) thus
> fixing the potential race between consumer calls and the memory pool
> initialization.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
Good to see this being worked on.
Perhaps you can add:
Reported-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
Link: https://lore.kernel.org/all/20250120151000.13870-1-johan+linaro@xxxxxxxxxx/
Johan