diff options
-rw-r--r-- | mm/mempolicy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index da946394655..c2aec0e1090 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -884,6 +884,10 @@ asmlinkage long sys_mbind(unsigned long start, unsigned long len, err = get_nodes(&nodes, nmask, maxnode); 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); } |