Commit:     3b42d28b2a04b3c9830eb865288239d45eccc402
Parent:     dec4ad86c2fbea062e9ef9caa6d6e79f7c5e0b12
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 00:12:08 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

    Page migration: Do not accept invalid nodes in the target nodeset
    Page migration currently does not check if the target of the move contains
    nodes that that are invalid (if root attempts to migrate pages)
    and may try to allocate from invalid nodes if these are specified
    leading to oopses.
    Return -EINVAL if an offline node is specified.
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Cc: Shaohua Li <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 mm/mempolicy.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 172abff..bb54b88 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -955,6 +955,11 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long 
                goto out;
+       if (!nodes_subset(new, node_online_map)) {
+               err = -EINVAL;
+               goto out;
+       }
        err = security_task_movememory(task);
        if (err)
                goto out;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to