aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c3
-rw-r--r--mm/migrate.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index a09ca3b1cf9c..c1592a94582f 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -941,8 +941,7 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode,
941 941
942 /* Find the mm_struct */ 942 /* Find the mm_struct */
943 read_lock(&tasklist_lock); 943 read_lock(&tasklist_lock);
944 task = pid ? 944 task = pid ? find_task_by_vpid(pid) : current;
945 find_task_by_pid_ns(pid, current->nsproxy->pid_ns) : current;
946 if (!task) { 945 if (!task) {
947 read_unlock(&tasklist_lock); 946 read_unlock(&tasklist_lock);
948 return -ESRCH; 947 return -ESRCH;
diff --git a/mm/migrate.c b/mm/migrate.c
index c479357b5480..4d6ee03db946 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -925,8 +925,7 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
925 925
926 /* Find the mm_struct */ 926 /* Find the mm_struct */
927 read_lock(&tasklist_lock); 927 read_lock(&tasklist_lock);
928 task = pid ? 928 task = pid ? find_task_by_vpid(pid) : current;
929 find_task_by_pid_ns(pid, current->nsproxy->pid_ns) : current;
930 if (!task) { 929 if (!task) {
931 read_unlock(&tasklist_lock); 930 read_unlock(&tasklist_lock);
932 return -ESRCH; 931 return -ESRCH;