msm: adsprpc: Create DSP mapping on basis of size for static flags

For new static flags create mapping on DSP on basis of size
rather than length. Since unmap will happen based on map size,
if len is not aligned it can lead to unmap failures due to len
and map size mismatch.

Change-Id: I3fd1bb55e552a85875650b83fb3a722c368c3137
Acked-by: Deepika Singh <dsi@qti.qualcomm.com>
Signed-off-by: vgattupa <vgattupa@codeaurora.org>
This commit is contained in:
vgattupa 2021-04-15 11:13:09 +05:30
commit b3ddb39fec

View file

@ -4686,7 +4686,7 @@ static int fastrpc_internal_mem_map(struct fastrpc_file *fl,
/* create DSP mapping */
VERIFY(err, !(err = fastrpc_mem_map_to_dsp(fl, ud->m.fd, ud->m.offset,
ud->m.flags, map->va, map->phys, ud->m.length, &map->raddr)));
ud->m.flags, map->va, map->phys, map->size, &map->raddr)));
if (err)
goto bail;
ud->m.vaddrout = map->raddr;