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, 2 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 35e454189966..fe5a3c6a5426 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1037,7 +1037,7 @@ static int do_move_page_to_node_array(struct mm_struct *mm,
1037 1037
1038 err = -EFAULT; 1038 err = -EFAULT;
1039 vma = find_vma(mm, pp->addr); 1039 vma = find_vma(mm, pp->addr);
1040 if (!vma || !vma_migratable(vma)) 1040 if (!vma || pp->addr < vma->vm_start || !vma_migratable(vma))
1041 goto set_status; 1041 goto set_status;
1042 1042
1043 page = follow_page(vma, pp->addr, FOLL_GET); 1043 page = follow_page(vma, pp->addr, FOLL_GET);
@@ -1204,7 +1204,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
1204 int err = -EFAULT; 1204 int err = -EFAULT;
1205 1205
1206 vma = find_vma(mm, addr); 1206 vma = find_vma(mm, addr);
1207 if (!vma) 1207 if (!vma || addr < vma->vm_start)
1208 goto set_status; 1208 goto set_status;
1209 1209
1210 page = follow_page(vma, addr, 0); 1210 page = follow_page(vma, addr, 0);