Merge "msm: ADSPRPC: Map and FD non-NULL check before dereferencing"

This commit is contained in:
qctecmdr 2020-07-29 14:20:19 -07:00 • committed by Gerrit - the friendly Code Review server
commit d8da30ecb7

View file

@ -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];