]> err.no Git - linux-2.6/blobdiff - mm/mempolicy.c
Merge branch 'for_linus' of git://git.linux-nfs.org/pub/linux/nfs-2.6
[linux-2.6] / mm / mempolicy.c
index 9f4e9b95e8f2238597f88b362221527160bf98f9..bb54b88c3d5aaab2752569f046129bea8082f4ec 100644 (file)
@@ -149,7 +149,7 @@ static struct zonelist *bind_zonelist(nodemask_t *nodes)
           lower zones etc. Avoid empty zones because the memory allocator
           doesn't like them. If you implement node hot removal you
           have to fix that. */
-       k = policy_zone;
+       k = MAX_NR_ZONES - 1;
        while (1) {
                for_each_node_mask(nd, *nodes) { 
                        struct zone *z = &NODE_DATA(nd)->node_zones[k];
@@ -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;
@@ -1605,11 +1610,11 @@ void __init numa_policy_init(void)
 
        policy_cache = kmem_cache_create("numa_policy",
                                         sizeof(struct mempolicy),
-                                        0, SLAB_PANIC, NULL, NULL);
+                                        0, SLAB_PANIC, NULL);
 
        sn_cache = kmem_cache_create("shared_policy_node",
                                     sizeof(struct sp_node),
-                                    0, SLAB_PANIC, NULL, NULL);
+                                    0, SLAB_PANIC, NULL);
 
        /*
         * Set interleaving policy for system init. Interleaving is only