diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 475138c42548..7f83be35d65c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -7078,8 +7078,12 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) | |||
7078 | 7078 | ||
7079 | if (migrate_task(p, cpumask_any_and(cpu_online_mask, new_mask), &req)) { | 7079 | if (migrate_task(p, cpumask_any_and(cpu_online_mask, new_mask), &req)) { |
7080 | /* Need help from migration thread: drop lock and wait. */ | 7080 | /* Need help from migration thread: drop lock and wait. */ |
7081 | struct task_struct *mt = rq->migration_thread; | ||
7082 | |||
7083 | get_task_struct(mt); | ||
7081 | task_rq_unlock(rq, &flags); | 7084 | task_rq_unlock(rq, &flags); |
7082 | wake_up_process(rq->migration_thread); | 7085 | wake_up_process(rq->migration_thread); |
7086 | put_task_struct(mt); | ||
7083 | wait_for_completion(&req.done); | 7087 | wait_for_completion(&req.done); |
7084 | tlb_migrate_finish(p->mm); | 7088 | tlb_migrate_finish(p->mm); |
7085 | return 0; | 7089 | return 0; |