summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-27 13:37:40 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-27 13:37:40 -0300
commitbadc0e42604c4465facd81d2323e98b3b1eb9188 (patch)
treee61811e7ddf70517f4b546d522ba3b630b38f50f /kernel/sched/sched.h
parentf19866e5cb04f8f007cb422132ea4611cdacc8e3 (diff)
Linux-libre 4.2.4-gnupck-4.2.4-gnu
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 84d48790b..08ab96b36 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1091,9 +1091,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 */