diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 172abffeb2e386fe08a333051934b73fcd98707a..bb54b88c3d5aaab2752569f046129bea8082f4ec 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -955,6 +955,11 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, goto out; } + if (!nodes_subset(new, node_online_map)) { + err = -EINVAL; + goto out; + } + err = security_task_movememory(task); if (err) goto out;