diff options
-rw-r--r-- | mm/migrate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index d493c02d4e4a..96178f4c1215 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1062,6 +1062,9 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages, goto out; err = -ENODEV; + if (node < 0 || node >= MAX_NUMNODES) + goto out; + if (!node_state(node, N_HIGH_MEMORY)) goto out; |