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

Commit 353582cf authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

adsprpc: update mmap list nodes before mmap free



Update mmap list links before every mmap free.

Change-Id: Icb612a329e8defd65414842bae20f459c02364b9
Acked-by: default avatarThyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent cb57e6b4
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -2333,7 +2333,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;

@@ -2356,9 +2356,16 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
	spin_unlock(&fl->hlock);
	fastrpc_context_list_dtor(fl);
	fastrpc_buf_list_free(fl);
	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);

	if (fl->sctx)
		fastrpc_session_free(&fl->apps->channel[cid], fl->sctx);
	if (fl->secsctx)