Only dealwith queue_pages_range locked vmas. Signed-off-by: Edward AD <eadavis@xxxxxxxx> --- mm/mempolicy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 42b5567e3773..13050b968479 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1342,6 +1342,8 @@ static long do_mbind(unsigned long start, unsigned long len, vma_iter_init(&vmi, mm, start); prev = vma_prev(&vmi); for_each_vma_range(vmi, vma, end) { + if (!vma || start < vma->vm_start) + continue; err = mbind_range(&vmi, vma, &prev, start, end, new); if (err) break; -- 2.25.1