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

Commit 2a6b24cd authored by Himateja Reddy's avatar Himateja Reddy
Browse files

msm: adsprpc: Allow kernel and static handle contexts



Currently if the active contexts exceeds limit, EDQUOT is returned.
Even kernel and static handle contexts returns failure when limit is
already reached. Allow kernel and static handle contexts even if the
limit is already reached.

Change-Id: Ib3c4cf45ea2369e671e0fd6f284f86a2bbde8fef
Signed-off-by: default avatarHimateja Reddy <hmreddy@codeaurora.org>
parent c322899f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1623,7 +1623,8 @@ static int context_alloc(struct fastrpc_file *fl, uint32_t kernel,
	unsigned long irq_flags = 0;

	spin_lock(&fl->hlock);
	if (fl->clst.num_active_ctxs > MAX_PENDING_CTX_PER_SESSION) {
	if (fl->clst.num_active_ctxs > MAX_PENDING_CTX_PER_SESSION &&
		!(kernel || invoke->handle < FASTRPC_STATIC_HANDLE_MAX)) {
		err = -EDQUOT;
		spin_unlock(&fl->hlock);
		goto bail;