X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Fcpuset.c;fp=kernel%2Fcpuset.c;h=dba9e4aef69aefce92aa7f0cc1a31996c2da64d9;hb=4729583006772b9530404bc1bb7c3aa4a10ffd4d;hp=4410ac6a55f1d9ae410976e3a8e7315acf88a61b;hpb=532de3fc72adc2a6525c4d53c07bf81e1732083d;p=~andy%2Flinux diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 4410ac6a55f..dba9e4aef69 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -974,12 +974,6 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, * Temporarilly set tasks mems_allowed to target nodes of migration, * so that the migration code can allocate pages on these nodes. * - * Call holding cpuset_mutex, so current's cpuset won't change - * during this call, as manage_mutex holds off any cpuset_attach() - * calls. Therefore we don't need to take task_lock around the - * call to guarantee_online_mems(), as we know no one is changing - * our task's cpuset. - * * While the mm_struct we are migrating is typically from some * other task, the task_struct mems_allowed that we are hacking * is for our current task, which must allocate new pages for that @@ -996,8 +990,10 @@ static void cpuset_migrate_mm(struct mm_struct *mm, const nodemask_t *from, do_migrate_pages(mm, from, to, MPOL_MF_MOVE_ALL); + rcu_read_lock(); mems_cs = effective_nodemask_cpuset(task_cs(tsk)); guarantee_online_mems(mems_cs, &tsk->mems_allowed); + rcu_read_unlock(); } /*