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

Commit 505cb22c authored by Sathish Ambley's avatar Sathish Ambley
Browse files

msm: ADSPRPC: Initialize hlist node pointers



Initialize the hlist node with valid previous node pointer
that would allow for the node to be deleted in error scenarios
where the buffer being passed from user space is invalid.

Change-Id: Ib16ed9ad2b39ca616563a2e5315951461212de64
Signed-off-by: default avatarSathish Ambley <sathishambley@codeaurora.org>
parent 30b24a3d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -536,6 +536,7 @@ static int context_alloc(struct fastrpc_file *fl, uint32_t kernel,
		goto bail;

	INIT_HLIST_NODE(&ctx->hn);
	hlist_add_fake(&ctx->hn);
	ctx->fl = fl;
	ctx->maps = (struct fastrpc_mmap **)(&ctx[1]);
	ctx->lpra = (remote_arg_t *)(&ctx->maps[bufs]);