Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 041511a0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: adsprpc: Check fastrpc file pointer before accessing it"

parents 4d14c37a ccafee2d
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -727,6 +727,8 @@ static void fastrpc_mmap_free(struct fastrpc_mmap *map, uint32_t flags)
	if (!map)
		return;
	fl = map->fl;
	if (fl && !(map->flags == ADSP_MMAP_HEAP_ADDR ||
				map->flags == ADSP_MMAP_REMOTE_HEAP_ADDR)) {
		cid = fl->cid;
		VERIFY(err, cid >= ADSP_DOMAIN_ID && cid < NUM_CHANNELS);
		if (err) {
@@ -735,6 +737,7 @@ static void fastrpc_mmap_free(struct fastrpc_mmap *map, uint32_t flags)
				__func__, cid, err);
			return;
		}
	}
	if (map->flags == ADSP_MMAP_HEAP_ADDR ||
				map->flags == ADSP_MMAP_REMOTE_HEAP_ADDR) {
		spin_lock(&me->hlock);