linux-yocto/include
Bartosz Golaszewski 6e7c7570ce firmware: qcom: scm: take struct device as argument in SHM bridge enable
commit dc3f4e75c5 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>
2025-09-04 16:55:51 +02:00
..
acpi
asm-generic
clocksource
crypto crypto: acomp - Fix CFI failure due to type punning 2025-08-28 16:34:34 +02:00
cxl
drm drm/tests: Do not use drm_fb_blit() in format-helper tests 2025-08-28 16:34:43 +02:00
dt-bindings clk: sunxi-ng: v3s: Fix CSI SCLK clock name 2025-07-03 23:31:04 +08:00
hyperv
keys
kunit
kvm
linux firmware: qcom: scm: take struct device as argument in SHM bridge enable 2025-09-04 16:55:51 +02:00
math-emu
media
memory
misc
net net: rose: convert 'use' field to refcount_t 2025-09-04 16:55:42 +02:00
pcmcia
ras
rdma RDMA/uverbs: Add empty rdma_uattrs_has_raw_cap() declaration 2025-08-15 16:39:06 +02:00
rv
scsi
soc
sound ASoC: cs35l56: Handle new algorithms IDs for CS35L63 2025-08-28 16:34:49 +02:00
target
trace btrfs: use refcount_t type for the extent buffer reference counter 2025-08-28 16:34:33 +02:00
uapi vhost: Fix ioctl # for VHOST_[GS]ET_FORK_FROM_OWNER 2025-09-04 16:55:30 +02:00
ufs
vdso
video
xen
Kbuild