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

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

Merge "adsprpc: update mmap list nodes before mmap free"

parents 2b6ae968 3e966761
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -2668,7 +2668,7 @@ static void fastrpc_session_free(struct fastrpc_channel_ctx *chan,
static int fastrpc_file_free(struct fastrpc_file *fl)
{
	struct hlist_node *n = NULL;
	struct fastrpc_mmap *map = NULL;
	struct fastrpc_mmap *map = NULL, *lmap = NULL;
	struct fastrpc_perf *perf = NULL, *fperf = NULL;
	int cid;

@@ -2692,9 +2692,15 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
	fastrpc_context_list_dtor(fl);
	fastrpc_buf_list_free(fl);
	mutex_lock(&fl->fl_map_mutex);
	do {
		lmap = NULL;
		hlist_for_each_entry_safe(map, n, &fl->maps, hn) {
		fastrpc_mmap_free(map, 1);
			hlist_del_init(&map->hn);
			lmap = map;
			break;
		}
		fastrpc_mmap_free(lmap, 1);
	} while (lmap);
	mutex_unlock(&fl->fl_map_mutex);
	if (fl->refcount && (fl->ssrcount == fl->apps->channel[cid].ssrcount))
		kref_put_mutex(&fl->apps->channel[cid].kref,