mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
msm: ADSPRPC: Map and FD non-NULL check before dereferencing
When fd is zero, we set context fds to NULL. This will avoid calling map create for context. Proper check is required to avoid dereferencing of map and fd. Change-Id: Id8d4b93d7d999e14ac1ebd8291137f799a73cf1a Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com> Signed-off-by: Jeya R <jeyr@codeaurora.org> Signed-off-by: Edgar Flores <edgarf@codeaurora.org>
This commit is contained in:
parent
74dea4a42e
commit
7dd7c6a789
1 changed files with 4 additions and 3 deletions
|
|
@ -2210,9 +2210,10 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
|
|||
PERF_END);
|
||||
for (i = bufs; i < bufs + handles; ++i) {
|
||||
struct fastrpc_mmap *map = ctx->maps[i];
|
||||
|
||||
pages[i].addr = map->phys;
|
||||
pages[i].size = map->size;
|
||||
if (map) {
|
||||
pages[i].addr = map->phys;
|
||||
pages[i].size = map->size;
|
||||
}
|
||||
}
|
||||
fdlist = (uint64_t *)&pages[bufs + handles];
|
||||
crclist = (uint32_t *)&fdlist[M_FDLIST];
|
||||
|
|
|
|||
Loading…
Reference in a new issue