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

Commit c83a851f authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: Fix "releasing a pinned lock" lockdep warning



WALT requires both src and dst runqueue locks to be held
during migration. So a double_lock_balance() is added
in move_queued_task() before calling set_task_cpu(). However,
releasing the src rq lock, which is pinned is giving a
lockdep warning. Fix this by unpinning the lock before
calling double_lock_balance.

Change-Id: I64dec0701b3467185cf53f311ebb521c6a822e88
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 58329ca1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1540,6 +1540,7 @@ static struct rq *move_queued_task(struct rq *rq, struct rq_flags *rf,

	WRITE_ONCE(p->on_rq, TASK_ON_RQ_MIGRATING);
	dequeue_task(rq, p, DEQUEUE_NOCLOCK);
	rq_unpin_lock(rq, rf);
	double_lock_balance(rq, cpu_rq(new_cpu));
	if (!(rq->clock_update_flags & RQCF_UPDATED))
		update_rq_clock(rq);