diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-06 17:05:36 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-06 17:05:36 +0200 |
commit | fe19159225d8516f3f57a5fe8f735c01684f0ddd (patch) | |
tree | 1a41faa5ef5139485f4afabd6bb9d3977c0a115b /kernel/sched/sched.h | |
parent | sched/core: Make 'sched_domain_topology' declaration static (diff) | |
parent | sched/core: Fix TASK_DEAD race in finish_task_switch() (diff) | |
download | linux-fe19159225d8516f3f57a5fe8f735c01684f0ddd.tar.xz linux-fe19159225d8516f3f57a5fe8f735c01684f0ddd.zip |
Merge branch 'sched/urgent' into sched/core, to pick up fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index af6f252e7e34..046242feff3a 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1072,9 +1072,10 @@ static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev) * After ->on_cpu is cleared, the task can be moved to a different CPU. * We must ensure this doesn't happen until the switch is completely * finished. + * + * Pairs with the control dependency and rmb in try_to_wake_up(). */ - smp_wmb(); - prev->on_cpu = 0; + smp_store_release(&prev->on_cpu, 0); #endif #ifdef CONFIG_DEBUG_SPINLOCK /* this is a valid case when another task releases the spinlock */ |