mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
adsprpc: validate VMID before hyp_assign during unmap
Validate VMID before doing hyp_assign_phys during unmap on DSP. Change-Id: I9c41416c9df12bd993bff59378ea66d31cda3686 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
This commit is contained in:
parent
4cec0cd668
commit
48be0c6411
@ -2041,12 +2041,15 @@ static int fastrpc_munmap_on_dsp_rh(struct fastrpc_file *fl,
|
||||
err = scm_call2(SCM_SIP_FNID(SCM_SVC_PIL,
|
||||
TZ_PIL_CLEAR_PROTECT_MEM_SUBSYS_ID), &desc);
|
||||
} else if (map->flags == ADSP_MMAP_REMOTE_HEAP_ADDR) {
|
||||
VERIFY(err, !hyp_assign_phys(map->phys, (uint64_t)map->size,
|
||||
if (me->channel[fl->cid].rhvm.vmid) {
|
||||
VERIFY(err, !hyp_assign_phys(map->phys,
|
||||
(uint64_t)map->size,
|
||||
me->channel[fl->cid].rhvm.vmid,
|
||||
me->channel[fl->cid].rhvm.vmcount,
|
||||
destVM, destVMperm, 1));
|
||||
if (err)
|
||||
goto bail;
|
||||
if (err)
|
||||
goto bail;
|
||||
}
|
||||
}
|
||||
|
||||
bail:
|
||||
|
Loading…
x
Reference in New Issue
Block a user