Re: [PATCH v3] sched: Reset cpumask if __migrate_task() failed for migration_cpu_stop()

From: Sebastian Andrzej Siewior

Date: Wed Dec 02 2026 - 09:26:39 EST


On 2026-11-28 18:24:30 [+0100], Karl Mehltretter wrote:
> On Thu, 26 Nov 2026 11:40:49 +0100, Peter Zijlstra wrote:
> > if (task_on_rq_queued(p)) {
> > + int cpu = arg->dest_cpu;
> > +
> > update_rq_clock(rq);
> > - rq = __migrate_task(rq, &rf, p, arg->dest_cpu);
> > + if (!is_cpu_allowed(p, cpu))
> > + cpu = select_fallback_rq(rq->cpu, p);
> > +
> > + rq = move_queued_task(rq, &rf, p, cpu);
>
> This deadlocks.

Ach you noticed this, too. Was a bit late…

Sebastian