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

Commit ff882481 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: Use spin_lock_irqsave in glink notify handler"

parents fc7a3432 9580dce3
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1830,16 +1830,18 @@ static int fastrpc_search_ctx(uint64_t rctx)
	struct smq_invoke_ctx *ictx = NULL;
	struct smq_invoke_ctx *ctx;
	int bfound = 0;
	unsigned long flags;
	unsigned long flags1;

	ctx = (struct smq_invoke_ctx *)(uint64_to_ptr(rctx));
	if (!ctx)
		return bfound;

	spin_lock(&me->hlock);
	spin_lock_irqsave(&me->hlock, flags);
	hlist_for_each_entry_safe(fl, n, &me->drivers, hn) {
		if (ctx->fl != fl)
			continue;
		spin_lock(&fl->hlock);
		spin_lock_irqsave(&fl->hlock, flags1);
		hlist_for_each_entry_safe(ictx, m, &fl->clst.pending, hn) {
			if (ptr_to_uint64(ictx) == rctx) {
				bfound = 1;
@@ -1852,11 +1854,11 @@ static int fastrpc_search_ctx(uint64_t rctx)
				break;
			}
		}
		spin_unlock(&fl->hlock);
		spin_unlock_irqrestore(&fl->hlock, flags1);
		if (bfound)
			break;
	}
	spin_unlock(&me->hlock);
	spin_unlock_irqrestore(&me->hlock, flags);
	return bfound;
}