Message ID | fd4bda7ad49f46545a03424fd1327dff8a8b8171.1582814004.git.zanussi@kernel.org |
---|---|
State | New |
Headers | show |
Series | Linux v4.14.170-rt75-rc2 | expand |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e10e3956bb29..f30bb249123b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7002,7 +7002,7 @@ void migrate_enable(void) WARN_ON(smp_processor_id() != cpu); if (!is_cpu_allowed(p, cpu)) { - struct migration_arg arg = { p }; + struct migration_arg arg = { .task = p }; struct cpu_stop_work work; struct rq_flags rf; @@ -7015,7 +7015,10 @@ void migrate_enable(void) &arg, &work); tlb_migrate_finish(p->mm); __schedule(true); - WARN_ON_ONCE(!arg.done && !work.disabled); + if (!work.disabled) { + while (!arg.done) + cpu_relax(); + } } out: