summaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-14 21:41:53 +0100
committerMark Brown <broonie@linaro.org>2014-01-14 21:41:53 +0100
commit64a9aa9cf57dd551a9ae9bf48f5e63be608aae72 (patch)
treed5776aa6b85c7a0c4fa3565bd3881f9607c293dc /kernel/cpuset.c
parentASoC: Allow PCMs to restrict the supported formats (diff)
parentLinux 3.13-rc3 (diff)
downloadlinux-64a9aa9cf57dd551a9ae9bf48f5e63be608aae72.tar.xz
linux-64a9aa9cf57dd551a9ae9bf48f5e63be608aae72.zip
Merge tag 'v3.13-rc3' into asoc-pcm
Linux 3.13-rc3
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6bf981e13c43..4772034b4b17 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1033,8 +1033,10 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk,
need_loop = task_has_mempolicy(tsk) ||
!nodes_intersects(*newmems, tsk->mems_allowed);
- if (need_loop)
+ if (need_loop) {
+ local_irq_disable();
write_seqcount_begin(&tsk->mems_allowed_seq);
+ }
nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);
mpol_rebind_task(tsk, newmems, MPOL_REBIND_STEP1);
@@ -1042,8 +1044,10 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk,
mpol_rebind_task(tsk, newmems, MPOL_REBIND_STEP2);
tsk->mems_allowed = *newmems;
- if (need_loop)
+ if (need_loop) {
write_seqcount_end(&tsk->mems_allowed_seq);
+ local_irq_enable();
+ }
task_unlock(tsk);
}