|
@@ -1704,7 +1704,7 @@ find_extend_vma(struct mm_struct *mm, unsigned long addr)
|
|
|
vma = find_vma_prev(mm, addr, &prev);
|
|
|
if (vma && (vma->vm_start <= addr))
|
|
|
return vma;
|
|
|
- if (expand_stack(prev, addr))
|
|
|
+ if (!prev || expand_stack(prev, addr))
|
|
|
return NULL;
|
|
|
if (prev->vm_flags & VM_LOCKED) {
|
|
|
if (mlock_vma_pages_range(prev, addr, prev->vm_end) < 0)
|