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

Commit 9342b762 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Gerrit - the friendly Code Review server
Browse files

sched: core: Skip migrating tasks that aren't enqueued on dead_rq



During migrate_tasks, we have to drop the dead_rq lock in
order to preserve locking order when acquiring task->pi_lock.
This may allow the task to migrate off of dead_rq. Therefore,
don't attempt to migrate such a task again from dead_rq.

Change-Id: Ide1532419688d0eabbfe8c24768d0e92cd110132
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 1a993968
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5656,8 +5656,8 @@ static void migrate_tasks(struct rq *dead_rq, struct rq_flags *rf,
		 * interferred since we don't stop all CPUs. Ignore warning for
		 * this case.
		 */
		if (WARN_ON((task_rq(next) != rq || !task_on_rq_queued(next)) &&
			     migrate_pinned_tasks)) {
		if (task_rq(next) != rq || !task_on_rq_queued(next)) {
			WARN_ON(migrate_pinned_tasks);
			raw_spin_unlock(&next->pi_lock);
			continue;
		}