diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 54f1b78d1b2c..94c74c594d10 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1071,6 +1071,10 @@ static long migrate_to_node(struct mm_struct *mm, int source, int dest, VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))); vma = find_vma(mm, 0); + if (unlikely(!vma)) { + mmap_read_unlock(mm); + return 0; + } /* * This does not migrate the range, but isolates all pages that