Index: linux-2.6.20-rc4-mm1/mm/mempolicy.c =================================================================== --- linux-2.6.20-rc4-mm1.orig/mm/mempolicy.c 2007-01-12 13:20:17.000000000 -0600 +++ linux-2.6.20-rc4-mm1/mm/mempolicy.c 2007-01-12 13:21:30.220968608 -0600 @@ -882,9 +882,12 @@ asmlinkage long sys_mbind(unsigned long int err; err = get_nodes(&nodes, nmask, maxnode); - nodes_and(nodes, nodes, current->mems_allowed); if (err) return err; +#ifdef CONFIG_CPUSETS + /* Restrict the nodes to the allowed nodes in the cpuset */ + nodes_and(nodes, nodes, current->mems_allowed); +#endif return do_mbind(start, len, mode, &nodes, flags); }