diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-30 15:12:03 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-04 17:55:51 +0300 |
| commit | 6e7c7570cec6a6ba5acd7491920d3036120047e9 (patch) | |
| tree | c24e69997a173b4ada1e2bb9ee8f88bf3ba0274a /scripts/gdb/linux/xarray.py | |
| parent | 617ad64abf488e898a6b6c73c4ddf42a67385bf7 (diff) | |
| download | linux-6e7c7570cec6a6ba5acd7491920d3036120047e9.tar.xz | |
firmware: qcom: scm: take struct device as argument in SHM bridge enable
commit dc3f4e75c54c19bad9a70419afae00ce6baf3ebf upstream.
qcom_scm_shm_bridge_enable() is used early in the SCM initialization
routine. It makes an SCM call and so expects the internal __scm pointer
in the SCM driver to be assigned. For this reason the tzmem memory pool
is allocated *after* this pointer is assigned. However, this can lead to
a crash if another consumer of the SCM API makes a call using the memory
pool between the assignment of the __scm pointer and the initialization
of the tzmem memory pool.
As qcom_scm_shm_bridge_enable() is a special case, not meant to be
called by ordinary users, pull it into the local SCM header. Make it
take struct device as argument. This is the device that will be used to
make the SCM call as opposed to the global __scm pointer. This will
allow us to move the tzmem initialization *before* the __scm assignment
in the core SCM driver.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-2-fa3851c98611@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/xarray.py')
0 files changed, 0 insertions, 0 deletions
