msm: adsprpc: To avoid null pointer dereference
To log error for fastrpc_mmap_remove_ssr and compat_fastrpc_get_dsp_info for avoiding null pointer dereferences leading to kw issues. Change-Id: I515485d891331e0740722a0de1291353db645b66 Acked-by: Ansa Ahmed <ansa@qti.qualcomm.com> Signed-off-by: Vamsi Krishna Gattupalli <quic_vgattupa@quicinc.com>
Этот коммит содержится в:

коммит произвёл
Gerrit - the friendly Code Review server

родитель
5f713c22a4
Коммит
27d9053c28
@@ -4031,19 +4031,22 @@ static int fastrpc_init_create_static_process(struct fastrpc_file *fl,
|
||||
err = fastrpc_mmap_create(fl, -1, NULL, 0, init->mem,
|
||||
init->memlen, ADSP_MMAP_REMOTE_HEAP_ADDR, &mem);
|
||||
mutex_unlock(&fl->map_mutex);
|
||||
if (err)
|
||||
if (err || (!mem))
|
||||
goto bail;
|
||||
spin_lock_irqsave(&me->hlock, irq_flags);
|
||||
mem->in_use = true;
|
||||
spin_unlock_irqrestore(&me->hlock, irq_flags);
|
||||
}
|
||||
VERIFY(err, mem);
|
||||
if (err)
|
||||
goto bail;
|
||||
phys = mem->phys;
|
||||
size = mem->size;
|
||||
/*
|
||||
* If remote-heap VMIDs are defined in DTSI, then do
|
||||
* hyp_assign from HLOS to those VMs (LPASS, ADSP).
|
||||
*/
|
||||
if (rhvm->vmid && mem && mem->refs == 1 && size) {
|
||||
if (rhvm->vmid && mem->refs == 1 && size) {
|
||||
u64 src_perms = BIT(QCOM_SCM_VMID_HLOS);
|
||||
struct qcom_scm_vmperm *dst_perms;
|
||||
uint32_t i = 0;
|
||||
|
Ссылка в новой задаче
Block a user