Re: could you clarify mm/mempolicy: fix !vma in new_vma_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 06-01-14 20:45:54, Bob Liu wrote:
[...]
>  544         if (PageAnon(page)) {
>  545                 struct anon_vma *page__anon_vma = page_anon_vma(page);
>  546                 /*
>  547                  * Note: swapoff's unuse_vma() is more efficient with this
>  548                  * check, and needs it to match anon_vma when KSM is active.
>  549                  */
>  550                 if (!vma->anon_vma || !page__anon_vma ||
>  551                     vma->anon_vma->root != page__anon_vma->root)
>  552                         return -EFAULT;
>  553         } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) {
>  554                 if (!vma->vm_file ||
>  555                     vma->vm_file->f_mapping != page->mapping)
>  556                         return -EFAULT;
>  557         } else
>  558                 return -EFAULT;
> 
> That's the "other conditions" and the reason why we can't use
> BUG_ON(!vma) in new_vma_page().

Sorry, I wasn't clear with my question. I was interested in which of
these triggered and why only for hugetlb pages?

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]