On Mon, 9 Dec 2024 at 15:28, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote: > > The SCM driver can defer or fail probe, or just load a bit later so > callers of qcom_scm_assign_mem() should defer if the device is not ready. > > This fixes theoretical NULL pointer exception, triggered via introducing > probe deferral in SCM driver with call trace: > > qcom_tzmem_alloc+0x70/0x1ac (P) > qcom_tzmem_alloc+0x64/0x1ac (L) > qcom_scm_assign_mem+0x78/0x194 > qcom_rmtfs_mem_probe+0x2d4/0x38c > platform_probe+0x68/0xc8 > > Fixes: d82bd359972a ("firmware: scm: Add new SCM call API for switching memory ownership") > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> > > --- > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>