aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 06d0877a66ef..c479357b5480 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -19,6 +19,7 @@
19#include <linux/pagemap.h> 19#include <linux/pagemap.h>
20#include <linux/buffer_head.h> 20#include <linux/buffer_head.h>
21#include <linux/mm_inline.h> 21#include <linux/mm_inline.h>
22#include <linux/nsproxy.h>
22#include <linux/pagevec.h> 23#include <linux/pagevec.h>
23#include <linux/rmap.h> 24#include <linux/rmap.h>
24#include <linux/topology.h> 25#include <linux/topology.h>
@@ -924,7 +925,8 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
924 925
925 /* Find the mm_struct */ 926 /* Find the mm_struct */
926 read_lock(&tasklist_lock); 927 read_lock(&tasklist_lock);
927 task = pid ? find_task_by_pid(pid) : current; 928 task = pid ?
929 find_task_by_pid_ns(pid, current->nsproxy->pid_ns) : current;
928 if (!task) { 930 if (!task) {
929 read_unlock(&tasklist_lock); 931 read_unlock(&tasklist_lock);
930 return -ESRCH; 932 return -ESRCH;