Index: linux-2.6/mm/mempolicy.c =================================================================== --- linux-2.6.orig/mm/mempolicy.c 2007-10-15 12:32:45.000000000 -0700 +++ linux-2.6/mm/mempolicy.c 2007-10-15 12:33:56.000000000 -0700 @@ -468,11 +468,13 @@ long do_set_mempolicy(int mode, nodemask new = mpol_new(mode, nodes); if (IS_ERR(new)) return PTR_ERR(new); + down_read(¤t->mm->mmap_sem); mpol_free(current->mempolicy); current->mempolicy = new; mpol_set_task_struct_flag(); if (new && new->policy == MPOL_INTERLEAVE) current->il_next = first_node(new->v.nodes); + up_read(¤t->mm->mmap_sem); return 0; }