summaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-11-09 19:29:39 +0100
committerDan Williams <dan.j.williams@intel.com>2015-11-09 19:29:39 +0100
commit85ce230051c37dfb979385eb0244bf3655625ba6 (patch)
tree90abeab25f8c1ea4836b38279790b90f0c780ae3 /kernel/sched/sched.h
parentpmem, memremap: convert to numa aware allocations (diff)
parentacpi: nfit: Add support for hot-add (diff)
downloadlinux-85ce230051c37dfb979385eb0244bf3655625ba6.tar.xz
linux-85ce230051c37dfb979385eb0244bf3655625ba6.zip
Merge branch 'for-4.4/hotplug' into libnvdimm-for-next
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 68cda117574c..6d2a119c7ad9 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1078,9 +1078,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 */